ravindup666
Published © LGPL

Arduino Bluetooth controlled car

This is my first Arduino-based, Bluetooth-controlled RC car. It is controlled by a smart phone application.

IntermediateProtip1,202
Arduino Bluetooth controlled car

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
Enclosure for Arduino Uno
Enclosure for Arduino Uno
×1
Dual H-Bridge motor drivers L298
SparkFun Dual H-Bridge motor drivers L298
×1
Battery Holder, 18650 x 2
Battery Holder, 18650 x 2
×1
Battery Holder, 18650 x 1
Battery Holder, 18650 x 1
×1
18650 battery
×3
DC Motor, 12 V
DC Motor, 12 V
×4
4wd car chassis
×1
Jumper wires (generic)
Jumper wires (generic)
×55

Software apps and online services

Arduino IDE
Arduino IDE
Bluetooth car app

Hand tools and fabrication machines

Hot glue gun (generic)
Hot glue gun (generic)
Soldering iron (generic)
Soldering iron (generic)
Solder Wire, Lead Free
Solder Wire, Lead Free

Story

Read more

Schematics

Diagram

Code

sketch_oct24b.ino

Arduino
char t;
 
void setup() {
pinMode(13,OUTPUT);   //left motors forward
pinMode(12,OUTPUT);   //left motors reverse
pinMode(11,OUTPUT);   //right motors forward
pinMode(10,OUTPUT);   //right motors reverse
pinMode(9,OUTPUT);   //Led
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(13,HIGH);
  digitalWrite(11,HIGH);
}
 
else if(t == 'B'){      //move reverse (all motors rotate in reverse direction)
  digitalWrite(12,HIGH);
  digitalWrite(10,HIGH);
}
 
else if(t == 'L'){      //turn right (left side motors rotate in forward direction, right side motors doesn't rotate)
  digitalWrite(11,HIGH);
}
 
else if(t == 'R'){      //turn left (right side motors rotate in forward direction, left side motors doesn't rotate)
  digitalWrite(13,HIGH);
}

else if(t == 'W'){    //turn led on or off)
  digitalWrite(9,HIGH);
}
else if(t == 'w'){
  digitalWrite(9,LOW);
}
 else if(t == 'w'){
  digitalWrite(5,HIGH);//turn led on or off)
  }
  else if(t == 'w'){
  digitalWrite(6,LOW);
}
else if(t == 'S'){      //STOP (all motors stop)
  digitalWrite(13,LOW);
  digitalWrite(12,LOW);
  digitalWrite(11,LOW);
  digitalWrite(10,LOW);
}
delay(000);
}

Credits

ravindup666
0 projects • 0 followers

Comments