Lesson 04
Learn how to detect the position and acceleration in space using an the MPU-6050 module
LiveStream video
- LiveStream video
- What you’ll learn
- Things’s you’ll needs
- Preparation
- Lets code!
- The Pitch and Roll program
What you’ll learn
In this lesson you will learn how to measure the pitch and roll of the SMARS robot using the MPU-6050 sensor module.
Things’s you’ll needs
Before you begin, you’ll need to make sure you have a couple of things before you start this lesson:
- A SMARS robot
- A USB Cable to connect to your computer
- A Computer that can run the Arduino IDE
- An MPU-6050 module
Preparation
- Connect the SMARS to the USB cable, and the USB Cable to your computer
- Launch the Arduino IDE on your computer
- Create a new Sketch, by clicking the
New Sketch
button
Lets code!
You can download the code below from GitHub, but its better to type it in yourself line by line, as you will get to understand what each line means.
The Pitch and Roll program
This page was first created on 15 July 2020, and was last updated on 15 July 2020