Hey everyone. We all enjoy army movies. One of the important things we like is the tanks displayed. We all love when tanks throw a fire ball and destroy opponents building. So have you wondered if you could make a tank prototype that can shoot. Lets make your wonder true by making a Bluetooth control DIY tank that shoots balloons.
Connections:
1) Tx of Bluetooth to rx of Arduino
2) Rx of Bluetooth to tx of Arduino
3) GND of Bluetooth to GND of Arduino
4) VCC of Bluetooth to 5V of Arduino
5) Signal pin of servo motor to 10 of Arduino
6) GND of Servomotor to GND of Arduino
7) VCC of Servo motor to 5V of Arduino
8) Take 4motors
9) Pin of motors to 11, 13, 5, 6 respectively
10) Another Pin of motors to GND
11) Red pin of dc water pump to common of relay
12) Black pinof dc water pump to negative of battery
13) Positive of dc water pump to normally open of relay
14) Signal pin of relay to 7 of arduino
15) Gnd to gnd
16) Vcc to 5v
Code:
void setup()
{
Serial.begin(9600);
pinMode(13, OUTPUT);
pinMode(11, OUTPUT) ;
pinMode(5, OUTPUT);
pinMode(6, OUTPUT);
pinMode(7, OUTPUT);
}
void loop()
{
if(Serial.available() >0)
{
char data= Serial.read();
Serial.print(data);
Serial.println(data);
if(data == 'a')
{digitalWrite(13, HIGH);
digitalWrite(11, LOW) ;
digitalWrite(5, HIGH);
digitalWrite(6, LOW) ;
}
else if(data == 'b')
{digitalWrite(13, LOW);
digitalWrite(11, HIGH) ;
digitalWrite(5, LOW);
digitalWrite(6, HIGH) ;
}
else if(data=='c')
{digitalWrite(13, HIGH) ;
digitalWrite(11, LOW) ;
digitalWrite(5, LOW) ;
digitalWrite(6, HIGH) ;}
else if(data=='d')
{digitalWrite(11, HIGH) ;
digitalWrite(13, LOW) ;
digitalWrite(6, LOW) ;
digitalWrite(5, HIGH) ;
}
else if(data=='e')
{digitalWrite(7, HIGH) ;
delay(20000);
digitalWrite(7, LOW) ;
}
else{
digitalWrite(13, LOW) ;
digitalWrite(11, LOW) ;
digitalWrite(7, LOW) ;
}
}
}
howto operate it:
make a cuboid of cardboard of whose breadth= diameter of dc water pump and add balloon at the at most end apply slime so it slips easily
write a when you want car to go front
write b when you want car to go back
write c and d when you want car turn left andright
physics behind it:
you might be wondering how the car rotates. Iwill explain it how with example
example:
when you are removing a bottle cap you will use two fingers thumb and index.
with the index finger you move it front and with thumb you move it backside.
the index will be placed left and thumb will be placed right the bottle rotates.
here when you press c and d the both motor rotates as they are placed opposite
.
the app to control it
https://play.google.com/store/apps/details?id=com.tools.ArduinoBluetooth
did you like the project?
do you want code for your project
contact me here
Comments