Friday, February 28, 2020

How to make Mercedes 6x6

Friends if you use VPN App in Android Mobile, So this is Best VPN app and it's Free, fast and secure

Install and use it


If you like it, please give us a 5 star rating on playstore.
Thankyou.



A4 Size Print

1



2


3



4







Code


char t;

void setup() {
pinMode(13,OUTPUT);   //left motors forward
pinMode(12,OUTPUT);   //left motors reverse
pinMode(11,OUTPUT);   //right motors forward
pinMode(10,OUTPUT);   //right motors reverse
pinMode(9,OUTPUT);   //right motors forward
pinMode(8,OUTPUT);   //Led
Serial.begin(9600);

}

void loop() {
if(Serial.available()){
  t = Serial.read();
  Serial.println(t);
}

if(t == 'F'){            //move forward(all motors rotate in forward direction)
  digitalWrite(13,HIGH);
  digitalWrite(11,HIGH);
}

else if(t == 'G'){      //move reverse (all motors rotate in reverse direction)
  digitalWrite(12,HIGH);
  digitalWrite(10,HIGH);
}

else if(t == 'L'){      //turn right (left side motors rotate in forward direction, right side motors doesn't rotate)
  digitalWrite(11,HIGH);
}

else if(t == 'R'){      //turn left (right side motors rotate in forward direction, left side motors doesn't rotate)
  digitalWrite(13,HIGH);
}

else if(t == 'm'){    //turn led on or off)
  digitalWrite(8,HIGH);
}
else if(t == 'M'){
  digitalWrite(8,LOW);
}

else if(t == 'n'){    //turn led on or off)
  digitalWrite(9,HIGH);
}
else if(t == 'N'){
  digitalWrite(9,LOW);
}

else if(t == 'X'){      //STOP (all motors stop)
  digitalWrite(13,LOW);
  digitalWrite(12,LOW);
  digitalWrite(11,LOW);
  digitalWrite(10,LOW);
}
delay(100);
}

No comments:

Post a Comment

How to make Mercedes 6x6

Friends if you use VPN App in Android Mobile, So this is Best VPN app and it's Free, fast and secure Install and use it Download If you ...