Gesture Control Car Using Mpu6050 and Arduino




Introduction: Gesture Control Car Using Mpu6050 and Arduino

here is a hand controller gesture control car, made by using mpu6050 and arduino. I use rf module for wireless connection.


•1.arduino uno

•2.micro Arduino

•3.rf module(transmitter and receiver)


•4.motor driver

•5.2 dc motor

•6.robotics chassis

•7. Arduino cable

• hand glapse

•9. motor driver

•10. LiPo Battery

•11. 9V battery

12.USB cable

Step 2: Connection:-

•1.connection for rf transmitter:-


•DATA = 12

•VCC = 5V

•2.connection for mpu6050:-

•VCC = 3.3/5v


•SCL = A3

•SDA = A2

•INT = 7

•mpu6050 need 3.5V voltage.but we can give it 5V voltage.i give here 3.5V voltage to mpu6050 because in micro arduino there

•are two voltage pin first is 5V and another one is 3.3V.rf reciever have to need i use 5V pin for rf transmitter.and

•mpu6050 can run 3.5V.

•3.connection for rf receiver:-


•DATA = 12

•VCC = 5V

•4.connection for motor driver:-

•motor one:-

•int enA = 11

•int in1 = 7

•int in2 = 6

•motor two:-

•int enB = 3

•int in3 = 5

•int in4 = 4

Step 3: Working Principal:-


MPU-6050 Triple Axis Accelerometer and Gyro Breakout read three angles.we can give them name X, Y, and Z, here we

use here only two angles. here we use Y and Z.Y for forward and Z for left, right.

this part of code read the angle.

reads the angles in radian, this "* 180/M_PI" make it in degree.

Step 4: ​•Rf Transmitter:-



Mpu6050 read the angles. then I make one “if” loop and make a then make two buffer sends condition for forward. and in the second one, I send the angle, for control the speed by the angle. this part of code sends the message. And I map the angle.


•Rf receiver:-

the receiver receives the message in the buffer. Again I make a condition on the first buffer for forward. And the second one I use for control the speed. And I again map it. This part of the code is doing this work. and for the speed control, I use the second buffer and, the angles mapped (0,9), I map speed in (50,255). you can see all things in code.

Step 6: Let's Run the Car:-

  • now the time has come to run the robot.make sure that all connection is correct. now connect your glapse's micro arduino to your computer. open the serial monitor, now you can see angles send any input from the transmitter to the receiver. now your robot is ready for a run.

Step 7:

if you fill difficulty in those codes. you can use these code. I make these because I fill you will difficulty fill in the transmitter code. so I make these easy code. and you won't need to follow 6th step. just connect the power the transmitter's Arduino and your robot is in your control.



    • Water Contest

      Water Contest
    • Fix It! Contest

      Fix It! Contest
    • Tiny Home Contest

      Tiny Home Contest

    18 Discussions

    Hey Buddy, I have my own design Block diagram of the Setup.. Help me in the Coding through it! Moreover msg. Me so I can give ya my Mail !
    Your program isn't running--> saying
    Error compiling for Arduino Board

    1 more answer

    What is enA and enB...??
    Any (trans or rec) code can be used to run the rf Car

    1 more answer

    enA and enB for dc motor connection. and yes u can this code for rf car.


    Question 7 weeks ago

    The 2nd code for the transmitter isn't compiling. its showing an error ' Vector ' was not declared in this scope.

    please guide me through this problem.

    1 more answer

    this is library problem... plz choose right library..

    which code are you using? 1st one or second code? if you use any code don't forget include library.after this, the error is coming than if you send me the error I will help you.

    i am using the second one can you pls send the link to the correct library i have to use


    Question 5 months ago

    Does we have to use same code for rf receiver and transmitter?
    Which updating the code it comes that it is not compatible..
    Please tell me what to do

    1 more answer

    if you are are comfortable with that code, you can also use that code, other wise you can use this code.

    yes, you can use. but there you have to change the code.