Bluetooth Controlled Car

Source Code:- #include <AFMotor.h> AF_DCMotor motor1(1, MOTOR12_1KHZ); AF_DCMotor motor2(2, MOTOR12_1KHZ); AF_DCMotor motor3(3, MOTOR34_1KHZ); AF_DCMotor motor4(4, MOTOR34_1KHZ); char command; void setup() { Serial.begin(9600); } void loop(){ if(Serial.available() > 0){ command = Serial.read(); Stop(); //initialize with motors stoped switch(command){ case ‘F’: forward(); break; case ‘B’: back(); break; case ‘L’: left(); break; case ‘R’: right(); break; } } … Read more