Welcome to Hackster!
Hackster is a community dedicated to learning hardware, from beginner to pro. Join us, it's free!
georgeselkassoufcharbelassaad
Published © GPL3+

4WD Bluetooth Controlled Car

The car was built using Arduino Uno and can be controlled remotely by a smartphone application via Bluetooth.

IntermediateFull instructions provided6,103
4WD Bluetooth Controlled Car

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
Dual H-Bridge motor drivers L298
SparkFun Dual H-Bridge motor drivers L298
×1
HC-05 Bluetooth Module
HC-05 Bluetooth Module
×1
Maker Essentials - Micro-motors & Grippy Wheels
Pimoroni Maker Essentials - Micro-motors & Grippy Wheels
×2
Jumper wires (generic)
Jumper wires (generic)
×1
LED (generic)
LED (generic)
×1
Samsung Li-ion Rechargeable Battery 3.7V 18650 2600mAh
×2
Li-ion Battey Holder for 2 x 18650 Batteries
×1

Software apps and online services

Arduino Car
Arduino IDE
Arduino IDE

Story

Read more

Schematics

Circuit Diagram

Code

Arduino Code

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

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

Credits

georgeselkassouf
0 projects • 0 followers
Contact
charbelassaad
0 projects • 0 followers
Contact

Comments

Please log in or sign up to comment.