9. Input¶
Gyro Scope¶
I decided to test out a gyro scope sensor for my input week as I was originally planning to try and use a gyroscope for my final project before I realized that I wanted to use joystick as my Input.
Overview¶
The idea was to use a gyroscope to monitor the orientation of the drone’s center mass and make corrections based on the calculations. I decided to try and find this data using the HiLetgo GY-521 MPU6050 3 Axis Gyroscope or just the MPU-6060 for short.
Process¶
a. First I did research on how other people use this with ESPs and Arduinos to get a value in the serial monitor based on the devices’s current location.
b. I did this by first powering its VCC and GND ports to my ESP 32’s ground and power
c. Next I connected pin blank and pin blank to the SCL(Serial Clock) and the SDA (Serial Data). I did this so I could accurately receive data from the gyroscope in the correct order that the movement happened.
d. For my code I choose to have the MPU send its values of how fast it’s moving and when it initializes, displayed in the serial monitor. When the speed is above 1.0 dps or the angular velocity in any direction is above the threshold of 1.0 then it triggers the LED to go high.
e. Next I connect an LED and started testing with the code and serial values. I found that it takes the MPU6050 a few seconds initially to convert to dps and then start sending the values to the serial monitor. After the invaliding period if the sensor is movement fast enough it will trigger the LED to turn on.
Reflection¶
This week I learned the value of input sensors and how they can be very useful tools in design projects as they are completely automated on their own and need no human input. I also learned how to do effective and useful research on a new part that I did not understand how to use. I had no idea how to use the MPU 6050 but after finding the developers websites and some other tutorial’s I was ready to design and create my own version of the project.