DFRobot ROB0118 Руководство - Страница 4
Просмотреть онлайн или скачать pdf Руководство для Робототехника DFRobot ROB0118. DFRobot ROB0118 13 страниц.
digitalWrite(directionPin_M1,HIGH);
analogWrite (speedPin_M1,rightSpeed);
digitalWrite(directionPin_M2,HIGH);
}
void carBack(int leftSpeed,int rightSpeed){
analogWrite (speedPin_M2,leftSpeed);
digitalWrite(directionPin_M1,LOW);
analogWrite (speedPin_M1,rightSpeed);
digitalWrite(directionPin_M2,LOW);
}
void carTurnRight(int leftSpeed,int rightSpeed){
analogWrite (speedPin_M2,leftSpeed);
digitalWrite(directionPin_M1,LOW);
analogWrite (speedPin_M1,rightSpeed);
digitalWrite(directionPin_M2,HIGH);
}
void carTurnLeft(int leftSpeed,int rightSpeed){
analogWrite (speedPin_M2,leftSpeed);
digitalWrite(directionPin_M1,HIGH);
analogWrite (speedPin_M1,rightSpeed);
digitalWrite(directionPin_M2,LOW);
}
STEP 3:Install Upper Plate
1. Prepare the Materials
//Move backward
//Turn Right
//Turn Left