malketh_123
Published © GPL3+

Arduino Bluetooth car

This is controlled by a smart phone, and has 4 motors.

BeginnerProtip851
Arduino Bluetooth car

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
HC-05 Bluetooth Module
HC-05 Bluetooth Module
×1
DC Motor, 12 V
DC Motor, 12 V
×4
Dual H-Bridge motor drivers L298
SparkFun Dual H-Bridge motor drivers L298
×1
9V battery (generic)
9V battery (generic)
×1
4xAA battery holder
4xAA battery holder
×1
Jumper wires (generic)
Jumper wires (generic)
×1

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Hot glue gun (generic)
Hot glue gun (generic)
Multitool, Screwdriver
Multitool, Screwdriver
Soldering iron (generic)
Soldering iron (generic)

Story

Read more

Schematics

circuit diagram

Code

Arduino car code

C/C++
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
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(12,LOW);
digitalWrite(11,HIGH);
digitalWrite(10,LOW);
}
else if (t =='B'){
digitalWrite(13,LOW);
digitalWrite(12,HIGH);
digitalWrite(11,LOW);
digitalWrite(10,HIGH);
}

else if(t == 'R'){ //turn right (left side motors rotate in forward direction, right side motors doesn't rotate)
digitalWrite(13,HIGH);

}

else if(t == 'L'){ //turn left (right side motors rotate in forward direction, left side motors doesn't rotate)
digitalWrite(11,HIGH);

}

else if(t == 'S'){ //STOP (all motors stop)
digitalWrite(13,LOW);
digitalWrite(12,LOW); 
digitalWrite(11,LOW);
digitalWrite(10,LOW);
}
delay(100);
}

Credits

malketh_123

malketh_123

0 projects • 2 followers

Comments