lightthedreams
Published © GPL3+

Bluetooth Controlled Car with Camera

How to build a remote controlled car toys using Arduino and Bluetooth Modul HC-05

BeginnerFull instructions provided139
Bluetooth Controlled Car with Camera

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
Dual H-Bridge motor drivers L298
SparkFun Dual H-Bridge motor drivers L298
×1
DC Motor, 12 V
DC Motor, 12 V
×1
Battery Holder, 18650 x 2
Battery Holder, 18650 x 2
×1

Software apps and online services

MIT App Inventor
MIT App Inventor
https://drive.google.com/file/d/1MqGp0nZLH__bo8rp0E6eNiZvNvwE3FTP/view?usp=sharing

Hand tools and fabrication machines

Drill / Driver, Cordless
Drill / Driver, Cordless
Soldering iron (generic)
Soldering iron (generic)
Solder Wire, Lead Free
Solder Wire, Lead Free
Mastech MS8217 Autorange Digital Multimeter
Digilent Mastech MS8217 Autorange Digital Multimeter
Cable Cutter, 143mm
Cable Cutter, 143mm

Story

Read more

Schematics

Schematic

Code

Sketch

Arduino
//youtube.com/lighttubes//
//poncolhijau.web.id//

int val;
int IN4 = 11; 
int IN3 = 10;
int IN2 = 9;
int IN1 = 8;
int LED = 13;

void setup()
{
  Serial.begin(9600);
  pinMode (IN4, OUTPUT);
  pinMode (IN3, OUTPUT);
  pinMode (IN2, OUTPUT);
  pinMode (IN1, OUTPUT);
  pinMode (LED, OUTPUT);
}

void loop()
{
if (Serial.available())
  {   
     val = Serial.read();
     if (val == 'U') //forward no stop
        {
        digitalWrite (IN1, HIGH);
        digitalWrite (IN2, LOW); 
        digitalWrite (IN3, HIGH);
        digitalWrite (IN4, LOW);         
        }     
     if (val == 'D') //backward no stop
        {
        digitalWrite (IN1, LOW);
        digitalWrite (IN2, HIGH); 
        digitalWrite (IN3, LOW);
        digitalWrite (IN4, HIGH);         
        }
     if (val == 'A') //forward
        {
        digitalWrite (IN1, HIGH);
        digitalWrite (IN2, LOW); 
        digitalWrite (IN3, HIGH);
        digitalWrite (IN4, LOW);         
        }
     if ( val == 'B') //backward
        {
         digitalWrite (IN1, LOW); 
         digitalWrite (IN2, HIGH);
         digitalWrite (IN3, LOW); 
         digitalWrite (IN4, HIGH);
        }
     if ( val == 'R') //TURN RIGHT
        {
         digitalWrite (IN1, LOW); 
         digitalWrite (IN2, HIGH);
         digitalWrite (IN3, HIGH); 
         digitalWrite (IN4, LOW);
        }
     if ( val == 'L') //TURN LEFT
        {
         digitalWrite (IN1, HIGH); 
         digitalWrite (IN2, LOW);
         digitalWrite (IN3, LOW); 
         digitalWrite (IN4, HIGH);
        }
      if ( val == 'X') //led ON
    {
         digitalWrite (LED, HIGH); 
        }  
      if ( val == 'Y') //led OFF
    {
         digitalWrite (LED, LOW); 
        }  
      if ( val == 'S') //stop
    {
         stop();
        }  
  }
}

void stop()
        {
         digitalWrite (IN1, LOW); 
         digitalWrite (IN2, LOW);
         digitalWrite (IN3, LOW); 
         digitalWrite (IN4, LOW);
        }

Credits

lightthedreams

lightthedreams

3 projects • 3 followers

Comments