jasrajdevs
Published © GPL3+

Arduino bluetooth car

A car that can be controlled with android(through bluetooth)

BeginnerFull instructions provided1 hour629
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
×2
9V battery (generic)
9V battery (generic)
×1
Jumper Wires
DIYables Jumper Wires
×20
L298N Motor Driver Module
DIYables L298N Motor Driver Module
×1
LED
DIYables LED
×5

Software apps and online services

bluetooth rc car
Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Tape, Double Sided
Tape, Double Sided

Story

Read more

Schematics

Circuit

Connect parts according to it

Code

Code

Arduino
upload it through arduino ide
char a;

#define m1 7  
#define m2 6  
#define m3 5  
#define m4 4  


#define fl 8   //front lights
#define fl2 9

#define bl 10//back lights
#define bl2 11
void setup() {
  pinMode(m1, OUTPUT);
  pinMode(m2, OUTPUT);
  pinMode(m3, OUTPUT); 
  pinMode(m4, OUTPUT);   
  pinMode(fl, OUTPUT); 
  pinMode(fl2, OUTPUT); 
  pinMode(bl, OUTPUT); 
  pinMode(bl2, OUTPUT); 
Serial.begin(9600);
 
}
 
void loop() {
if(Serial.available()){
  a = Serial.read();
  Serial.println(a);
}
 
if(a == 'F'){            
  digitalWrite(m1, HIGH);
  digitalWrite(m2, LOW);
  digitalWrite(m3, HIGH);
  digitalWrite(m4, LOW);
}
 
else if(a == 'B'){      
  digitalWrite(m2, HIGH);
  digitalWrite(m1, LOW);
  digitalWrite(m4, HIGH);
  digitalWrite(m3, LOW);
}
 
else if(a == 'L'){     
  digitalWrite(m1, LOW);
  digitalWrite(m2, LOW);
  digitalWrite(m3, HIGH);
  digitalWrite(m4, LOW);
}
 
else if(a == 'R'){      
  digitalWrite(m1, HIGH);
  digitalWrite(m2, LOW);
  digitalWrite(m3, LOW);
  digitalWrite(m4, LOW);
}
else if(a == 'W'){     
  digitalWrite(fl, HIGH);
  digitalWrite(fl2, HIGH);
}
else if(a == 'w'){      
  digitalWrite(fl, LOW);
  digitalWrite(fl2, LOW);
}
else if(a == 'U'){      
  digitalWrite(bl, HIGH);
  digitalWrite(bl2, HIGH);
}
else if(a == 'u'){      
  digitalWrite(bl, LOW);
  digitalWrite(bl2, LOW);
}

else{     
  digitalWrite(m1,LOW);
  digitalWrite(m2,LOW);
  digitalWrite(m3,LOW);
  digitalWrite(m4,LOW);
}

delay(100);
}

Credits

jasrajdevs

jasrajdevs

7 projects • 10 followers
Developing since 2020 july..... I am a student.

Comments