Gesture Control Robot With Arduino

we are having many functions in the mobile phone via control the gesture. So, how will be the robot who’s work on the gesture? we are making a robotic car controls by the Gesture. When you tilt your hand in front then the robot will move forward and when you tilt your hand in back then the robot will move backward the same function for right and left. this gesture control robot with Arduino is really amazing.

 

 

it is a simple RC robot which works on the wireless data transmitting in this gesture control robot with Arduino is having two parts one is transmitter and another is a receiver and both have Bluetooth to send and receive the data. The Bluetooth transmitting and receiving data by the master-slave configuration. and the transmitter has the master Bluetooth which send the data to the slave which is a receiver.

It works on the principle of accelerometer and you have to calibrate the sensor with the position of your hand. we are posting the full tutorial of the gesture control robot in the article. the transmitter parts having the Bluetooth module HC-05, Accelerometer, and the Arduino UNO. The accelerometer detects the tilt position in the transmitter. and give it to the Arduino Arduino send the data via Bluetooth module to the receiver. in the receiver, the data received by the slave Bluetooth module send to the Arduino. Arduino makes give instruction to the Robot car. to move. it can move forward, backward, right and left. gesture control robot works the same as the Bluetooth RC car but it gets the instruction wirelessly.

Component Required for gesture control robot:-

  1. Transmitter 
  • Bluetooth Module HC-05
  • Arduino
  • Accelerometer.
  • Wires
  • Well pro
  • Battery

2.  Receiver

  • Bluetooth Module HC-05
  • Arduino
  • Chassis
  • 4 motors
  • L298N
  • Battery
  • Breadboard mini
  • Wires.

you need these above mention things to make the full setup.

first, you need to Configure the Bluetooth module to the master and slave by the AT command.

For Slave

  1. Connect Bluetooth module HC-05 with the Arduino Rx, Tx, Vcc, GND
  2. upload an empty program in the Arduino
  3. Push and hold the reset button to the Bluetooth module and power the Bluetooth module.
  4. now, open the serial monitor of the Arduino IDE.
  5. Send some command like AT, AT+NAME, AT+ADDR and copy the address of the slave module.

For Master 

  1. Connect Bluetooth module HC-05 with the Arduino Rx, Tx, Vcc, GND
  2. upload an empty program in the Arduino
  3. Push and hold the reset button to the Bluetooth module and power the Bluetooth module.
  4. now, open the serial monitor of the Arduino IDE.
  5. Send some command like AT, AT+NAME,     AT+ROLE=1,      AT+CMODE=0,       AT+LINK=SLAVE ADDR,      AT + BIND=SLAVE ADDR

 

Circuit Diagram for Gesture Control Robot:- 

 

circuit diagram for gesture robot

 

Arduino code for Gesture control robot 

Transmitter code:-

#include<SoftwareSerial.h>
SoftwareSerial mybt(2,3);
char m=0,n=0;

void setup() {
pinMode(10, OUTPUT);
pinMode(11, OUTPUT);
pinMode(12, OUTPUT);
pinMode(13, OUTPUT);
Serial.begin(9600);
mybt.begin(9600);
}

void loop() {
if(mybt.available()>0)
{
m= mybt.read();
Serial.println(m);
if(m==’F’)

{
digitalWrite(10, HIGH);
digitalWrite(11, LOW);
digitalWrite(12, HIGH);
digitalWrite(13, LOW);

}

else if(m==’B’)

{
digitalWrite(10, LOW);
digitalWrite(11, HIGH);
digitalWrite(12, LOW);
digitalWrite(13, HIGH);

}

else if(m==’R’)

{
digitalWrite(10, LOW);
digitalWrite(11, HIGH);
digitalWrite(12, HIGH);
digitalWrite(13, LOW);

}
else if(m==’L’)

{
digitalWrite(10, HIGH);
digitalWrite(11, LOW);
digitalWrite(12, LOW);
digitalWrite(13, HIGH);

}

else if(m==’N’)

{
digitalWrite(10, LOW);
digitalWrite(11, LOW);
digitalWrite(12, LOW);
digitalWrite(13, LOW);

}
else

{
digitalWrite(10, LOW);
digitalWrite(11, LOW);
digitalWrite(12, LOW);
digitalWrite(13, LOW);

}

} }

 

Receiver Code:-

 

#include<SoftwareSerial.h>
SoftwareSerial mybt(2,3);
int m=0, n=0;

void setup() {

pinMode(A0, INPUT);
pinMode(A1, INPUT);
mybt.begin(9600);
Serial.begin(9600);
}

void loop() {
m = analogRead(A0);
n = analogRead(A1);

//Serial.println(m);
//delay(500);
//Serial.println(n);
//delay(500);

if(n>=375)

{
mybt.write(“F”);
Serial.println(“F”);

}

else if(n<=320)

{
mybt.write(“B”);
Serial.println(“B”);

}

else if(m>=375)
{
mybt.write(“R”);
Serial.println(“R”);

}

else if(m<=315)
{
mybt.write(“L”);
Serial.println(“L”);

}

else
{
mybt.write(“N”);
Serial.println(“N”);

}
}

Upload the code into Arduino and assemble the components according to the circuit diagram.

Leave a Reply

Your email address will not be published. Required fields are marked *