aadidahiya13
Published © LGPL

4 Wheeled Bluetooth Controlled Rc Car

Tired of Joystick, Control with your phone. Uses L298n, Arduino UNO, HC-05 .

IntermediateWork in progress78
4 Wheeled Bluetooth Controlled Rc Car

Things used in this project

Hardware components

Arduino UNO & Genuino UNO
Arduino UNO & Genuino UNO
×1
Dual H-Bridge motor drivers L298
SparkFun Dual H-Bridge motor drivers L298
×1
DC Motor, 12 V
DC Motor, 12 V
×1
HC-05 Bluetooth Module
HC-05 Bluetooth Module
×1
9V battery (generic)
9V battery (generic)
×1
4xAA battery holder
4xAA battery holder
×1
9V to Barrel Jack Connector
9V to Barrel Jack Connector
×1

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)

Story

Read more

Schematics

Schematic

There will be same connections for HC-05

Code

Code for Bluetooth controlled car

Arduino
upload it in Arduino Uno Board
#include <SoftwareSerial.h>
char t;
 
void setup() {
pinMode(12,OUTPUT);   //left motors forward
pinMode(11,OUTPUT);   //left motors reverse
pinMode(10,OUTPUT);   //right motors forward
pinMode(9,OUTPUT);   //right motors reverse
SoftwareSerial mySerial(0, 1); // RX, TX
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(12,HIGH);
  digitalWrite(10,HIGH);
}
 
else if(t == 'B'){      //move reverse (all motors rotate in reverse direction)
  digitalWrite(11,HIGH);
  digitalWrite(9,HIGH);
}
 
else if(t == 'L'){      //turn right (left side motors rotate in forward direction, right side motors doesn't rotate)
  digitalWrite(10,HIGH);
}
 
else if(t == 'R'){      //turn left (right side motors rotate in forward direction, left side motors doesn't rotate)
  digitalWrite(12,HIGH);
}
 
else if(t == 'S'){      //STOP (all motors stop)
  digitalWrite(12,LOW);
  digitalWrite(11,LOW);
  digitalWrite(10,LOW);
  digitalWrite(9,LOW);
}
delay(1);
}

Credits

aadidahiya13

aadidahiya13

1 project • 0 followers

Comments