DFRobot ROB0118 Manual - Página 4

Procurar online ou descarregar pdf Manual para Robótica DFRobot ROB0118. DFRobot ROB0118 13 páginas.

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