Abhinand A SSIG TKMCE
Published

Arduino - Bluetooth Controlled RC Car

It's a 3-wheel car using Arduino, L293D and Bluetooth module which is controlled by Android phones.

BeginnerWork in progress3 hours9,712
Arduino - Bluetooth Controlled RC Car

Things used in this project

Hardware components

Arduino UNO & Genuino UNO
Arduino UNO & Genuino UNO
×1
HC-05 Bluetooth Module
HC-05 Bluetooth Module
×1
L293D Motor Driver Module
×1
DC motor
×2
Chassis
×1
Jumper wires (generic)
×1
9V battery
×1
9V Battery Clip
9V Battery Clip
×1
9V to Barrel Jack Connector
9V to Barrel Jack Connector
×1

Software apps and online services

Arduino IDE
Arduino IDE
Bluetooth RC Controller App

Story

Read more

Schematics

Schematics

Code

Arduino Code

Arduino
/*ARDUINO BLUETOOTH RC CAR: 
SIGIoT TKMCE
Author: Abhinand A S
Date: 8/11/2018
 */
 
int motorRightA = 5;    //Right Motor-clockwise
int motorRightB = 6;   //Right Motor-anticlockwise
int motorLeftA = 11;    //Left Motor-clockwise
int motorLeftB = 12;    //Left Motor-clockwise

char bt = 0;       //BT 
/*-----------------------------------------------------------------------------------------------------*/

void setup()
{
  Serial.begin(9600);
  
  pinMode(motorRightA,OUTPUT);
  pinMode(motorRightB,OUTPUT);
  pinMode(motorRightB,OUTPUT);
  pinMode(motorLeftB,OUTPUT);
}
void loop()
{
  if (Serial.available() > 0)
  {
    bt = Serial.read();
    digitalWrite(led, 1);
    /*_________________________________________________________________________________________________*/
    
    if(bt == 'F')        //move forwards
    {
      digitalWrite(motorRightA, HIGH);
      digitalWrite(motorRightB, LOW);
      digitalWrite(motorLeftA,  HIGH);
      digitalWrite(motorLeftB, LOW);
    }
    else if (bt == 'B')       //move backwards
    {
      digitalWrite(motorRightA, LOW);
      digitalWrite(motorRightB, HIGH);
      digitalWrite(motorLeftA, LOW);
      digitalWrite(motorLeftB, HIGH);
    }
    else if (bt == 'S')     //stop!!
    {   
      digitalWrite(motorRightA, LOW);
      digitalWrite(motorRightB, LOW);
      digitalWrite(motorLeftA, LOW);
      digitalWrite(motorLeftB, LOW);
    }
    else if (bt == 'R')    //right
    {
      digitalWrite(motorRightA, HIGH);
      digitalWrite(motorRightB, LOW);
      digitalWrite(motorLeftA, LOW);
      digitalWrite(motorLeftB, LOW);
    }
    else if (bt == 'L')     //left
    {
      digitalWrite(motorRightA, LOW);
      digitalWrite(motorRightB, LOW);
      digitalWrite(motorLeftA, HIGH);
      digitalWrite(motorLeftB, LOW);
    }
    else if (bt == 'I')    //forward right
    {
      digitalWrite(motorRightA, HIGH);
      digitalWrite(motorRightB, LOW);
      digitalWrite(motorLeftA, LOW);
      digitalWrite(motorLeftB, HIGH);
    }
    else if (bt == 'G')    //forward left
    {
      digitalWrite(motorRightA, LOW);
      digitalWrite(motorRightB, HIGH);
      digitalWrite(motorLeftA, HIGH);
      digitalWrite(motorLeftB, LOW);
   }

      
    }
  
  }
  

Credits

Abhinand A S

Abhinand A S

1 project • 5 followers
SIG TKMCE

SIG TKMCE

0 projects • 1 follower

Comments