DFRobot ROB0117 Panduan Memulai Cepat - Halaman 3

Jelajahi secara online atau unduh pdf Panduan Memulai Cepat untuk Mikrokontroler DFRobot ROB0117. DFRobot ROB0117 13 halaman. Basic kit for cherokey 4wd

2015/11/4
Wiring
2. Download Code
int speedPin_M1 = 5;
int speedPin_M2 = 6;
int directionPin_M1 = 4;
int directionPin_M2 = 7;
void setup(){
}
void loop(){
carAdvance(100,100);
delay(1000);
carBack(100,100);
delay(1000);
carTurnLeft(250,250);
delay(1000);
carTurnRight(250,250);
delay(1000);
}
void carStop(){
digitalWrite(speedPin_M2,0);
digitalWrite(directionPin_M1,LOW);
digitalWrite(speedPin_M1,0);
digitalWrite(directionPin_M2,LOW);
}
void carBack(int leftSpeed,int rightSpeed){
analogWrite (speedPin_M2,leftSpeed);
digitalWrite(directionPin_M1,HIGH);
analogWrite (speedPin_M1,rightSpeed);
digitalWrite(directionPin_M2,HIGH);
https://www.dfrobot.com/wiki/index.php?title=Basic_Kit_for_Cherokey_4WD_SKU:ROB0117
Basic Kit for Cherokey 4WD SKU:ROB0117 - Robot Wiki
//M1 Speed Control
//M2 Speed Control
//M1 Direction Control
//M1 Direction Control
// Motor Stop
//Move backward
//PWM Speed Control
3/13