Popular posts from this blog
Bluetooth Controlled car code - T4TECHZ
Bluetooth Controlled Car Code T4TECHZ // Starting of Program int m1a = 9; int m1b = 10; int m2a = 11; int m2b = 12; char val; void setup() { pinMode(m1a, OUTPUT); // Digital pin 10 set as output Pin pinMode(m1b, OUTPUT); // Digital pin 11 set as output Pin pinMode(m2a, OUTPUT); // Digital pin 12 set as output Pin pinMode(m2b, OUTPUT); // Digital pin 13 set as output Pin Serial.begin(9600); } void loop() { while (Serial.available() > 0) { val = Serial.read(); Serial.println(val); } if( val == 'F') // Forward { digitalWrite(m1a, HIGH); digitalWrite(m1b, LOW); digitalWrite(m2a, HIGH); digitalWrite(m2b, LOW); } else if(val == 'B') // Backward ...
Comments
Post a Comment