Posts

Showing posts from October, 2021

How To Make HC-05 Bluetooth Controlled Car With Arduino U...

Image
 Diagram Code  #include <AFMotor.h> //initialising motors pin 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);  //Set the baud rate to your Bluetooth module. } void loop(){   if(Serial.available() > 0){      command = Serial.read();      Stop(); //initialize with motors stoped     //Change pin mode only if new command is different from previous.        //Serial.println(command);     switch(command){     case 'F':         forward();       break;     case 'B':          back();       break;     case 'L':         left();       break;   ...