How to make Gesture Control Robot using Arduino

How to make Gesture Control Robot using Arduino

how to make gesture control robot at home

Welcome to the Techatronic Guys, In this article, we will learn how to make a Gesture control robot at home. if you wanna learn how to make it carefully read the full article. this is the most interesting and popular project nowadays in electronics and engineering, many of the students from college and school making this awesome project. the interesting thing is that this is the wireless robot that you can control by just your hand gesture. we will learn in this project many things such as Bluetooth communication, master-slave communication, serial communication, how to interface Bluetooth and the accelerometer sensor with the Arduino, how to make circuit diagram and how to write the code.

How does it work?

Gesture control robot with Arduino totally controlled by the Arduino which gets the instruction by another Arduino with serial communication. there are two parts in this project one is known as the transmitter and another is known as the receiver. here the work of both is different. so we will start with the transmitter first and then the receiver. we are using master-slave communication in this project. there are many other Bluetooth control Arduino project you should check Bluetooth Rc car. this is an awesome project.

Transmitter:-

The transmitter in this project the master circuit which will transfer the data to another module. we make the system master-slave communication. one Bluetooth will work as a master and another will work as the slave. so the master will give instruction to the slave one and the slave receive the instruction from the master and send all instruction to the Arduino attached. the transmitter contains Arduino, Bluetooth HC-05, Accelerometer. general-purpose PCB.

The accelerometer detects the variation in the acceleration in all axis. so, we put the accelerometer on our hand and then relate it to the gestures. there will many reading changes in each direction and we will use these readings to make the condition in the Arduino to take a decision. for example, if you tilt your hand in the right direction the Arduino send left to the slave device and the slave will start to move in the right direction. all the directions in the robot will define the same. 

Receiver:- 

The receiver is the most important part of the Gesture control robot. it will receive the information by the Bluetooth communication and send it to the Arduino then according to the database in the Arduino it will take the decision. so there is an L298 motor driver connected to the Arduino which converts the low output signal into the high voltage signal so that the driver can drive the motors. in this receiver, the Bluetooth works as a slave and follows the instruction of the master. and it can’t connect to another Bluetooth.

 

Gesture Control Robot Circuit Diagram:-

Gesture control robot circuit

 

As you can see the two diagrams in the above picture. one is for the transmitter and another is for the receiver. make this both circuit separately.

Now we are also giving the code for both.

Gesture control robot Arduino Code.smit

Receiver code.

 

//Receiver code 
//all the best
#include
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);

}

} }

Transmitter Code.

//transmitter code 
//all the best
#include
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 the transmitter and receiver by the Arduino IDE.

and subscribe us on youtube 

Watch this full video on youtube

This Post Has 4 Comments

  1. Jaibarrath

    While verifing the program it shows
    #include expects filename
    What to do bro

    1. shahid saifi

      hello, now i have fixed the bug in given code. you can use the code now.

  2. ganesh

    can you please provide the above libraries those are half left……
    I am pleading you iam at the final week of submission……

    1. shahid saifi

      Hello, now you can use the above given code i have fixed the error. thanks

Comments are closed.