|
nRF24Lo1+ |
x 1 | |
|
Arduino Nano V3 |
x 1 | |
|
MPU6050 |
x 1 |
|
arduino IDEArduino
|
How to Make Gesture Control Robot || #MadeWithArduino (Transmitter)
Hey, Welcome back to a new project. So today we will learn to create a Gesture Control Car using Arduino.
Here I am going to share the detailed tutorial of the transmitter part of the project, I have also shared another tutorial on the receiver part of the project. Here is the link to see it: https://bit.ly/3lZOOUI
Check out the project tutorial video on YouTube:
First, let's talk about the materials that we require:
~ Arduino Nano
~ MPU 6050
~ nRF24Lo1+
~ Male and Female Headers
~ 9V Battery
Get started with Mounting the components:
After arranging the above components we will need to solder the female header pins to the PCBs as shown in the image.
Now one by one we will need to mount the components to the PCB. In the following pattern:
After being done mounting the components we will need to upload the code which is given as an attachment to this article.
Note: Before uploading the code make sure to connect the Arduino Nano with your computer and include the required libraries.
After connecting it, open Arduino IDE and upload the code.
When you are done with the uploading of the code simply disconnect the Arduino Nano from the computer.
Mounting the PCB to a wristwatch:
In this project to hold the Transmitter in my hand so that it can track my gesture I have made a wristwatch strip from cardboard and mounted the PCB into it with the help of a double-sided tape. As shown in the image.
So that is all for this project. Make sure to check out the Receiver project tutorial (https://bit.ly/3lZOOUI) and also Check our YouTube Tutorial Video:
?
Thank you.
//Arduino Gesture control Transmitter Code
//Created By DIY Burner
//Contact me here on Instagram https://www.instagram.com/diy_burner/
//You need to include MPU6050.h and I2CDEV.h library before uploading the sketch, otherwise you'll get compilation error message.
#include <SPI.h> //SPI library for communicate with the nRF24L01+
#include "RF24.h" //The main library of the nRF24L01+
#include "Wire.h" //For communicate
#include "I2Cdev.h" //For communicate with MPU6050
#include "MPU6050.h" //The main library of the MPU6050
MPU6050 mpu;
int16_t ax, ay, az;
int16_t gx, gy, gz;
//Define packet for the direction (X axis and Y axis)
int data[2];
//Define object from RF24 library - 9 and 10 are a digital pin numbers to which signals CE and CSN are connected.
RF24 radio(8,9);
//Create a pipe addresses for the communicate
const uint64_t pipe = 0xE8E8F0F0E1LL;
void setup(void){
Serial.begin(9600);
Wire.begin();
mpu.initialize(); //Initialize the MPU object
radio.begin(); //Start the nRF24 communicate
radio.openWritingPipe(pipe); //Sets the address of the receiver to which the program will send data.
}
void loop(void){
//With this function, the acceleration and gyro values of the axes are taken.
//If you want to control the car axis differently, you can change the axis name in the map command.
mpu.getMotion6(&ax, &ay, &az, &gx, &gy, &gz);
//In two-way control, the X axis (data [0]) of the MPU6050 allows the robot to move forward and backward.
//Y axis (data [0]) allows the robot to right and left turn.
data[0] = map(ax, -17000, 17000, 300, 400 ); //Send X axis data
data[1] = map(ay, -17000, 17000, 100, 200); //Send Y axis data
radio.write(data, sizeof(data));
}
How to Make Gesture Control Robot || #MadeWithArduino (Transmitter)
*PCBWay community is a sharing platform. We are not responsible for any design issues and parameter issues (board thickness, surface finish, etc.) you choose.
- Comments(0)
- Likes(0)
- 0 USER VOTES
- YOUR VOTE 0.00 0.00
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
More by DIY Burner
- How to Make Gesture Control Robot || #MadeWithArduino (Transmitter) Hey, Welcome back to a new project. So today we will learn to create a Gesture Control Car using Ard...
- How to Make Gesture Control Robot || #MadeWithArduino (Receiver PCB) Hey, Welcome back to a new project. So today we will learn to create a Gesture Control Car using Ard...
-
TEKTRONIX THS710,THS720,THS730 External Battery Charger with 3D Printed Case
39 1 0 -