0% found this document useful (0 votes)
17 views

Exercise 3: Picture Courtesy

This document provides instructions for using a gyroscope sensor with an Arduino. It describes: 1) Connecting an MPU6050 gyroscope breakout board to an Arduino Uno using I2C interface pins. 2) Opening a sample Arduino code that reads raw sensor values and swaps bytes. 3) The code inside the setup() and loop() functions to read sensor values every second. 4) A placeholder for adding code to detect motion along the x and y axes.

Uploaded by

Lim Zhe Xian
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Exercise 3: Picture Courtesy

This document provides instructions for using a gyroscope sensor with an Arduino. It describes: 1) Connecting an MPU6050 gyroscope breakout board to an Arduino Uno using I2C interface pins. 2) Opening a sample Arduino code that reads raw sensor values and swaps bytes. 3) The code inside the setup() and loop() functions to read sensor values every second. 4) A placeholder for adding code to detect motion along the x and y axes.

Uploaded by

Lim Zhe Xian
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Exercise 3

Introduction:

We shall now look at using a Gyroscope in this exercise.

Procedure:

1. The MPU6050 breakout board is connected to the Arduino using the I2C interface. The I2C
interface is available on 2 pins besides the AREF pin on the RHS header

Picture courtesy: www.dx.com/p/development-board-w-data-cable-for-arduino-uno-r3-deep-blue-cable-52cm-


312887

Pic courtesy: http://playground.arduino.cc/uploads/Main/mpu-6050.jpg

The MPU 6050 breakout board works on 5V, so the VCC pin on the breakout board is
connected to the 5V pin, and the GND pin can be connected to any of the GND pins on the
Arduino UNO.

2. Open up the Gyroscope.ino file. The default code comes from the sample example
http://playground.arduino.cc/Main/MPU-6050.
3. Inside the setup routine, you will notice code that reads raw values from the sensor and
swaps the bytes around, to get them in the correct order.

4. Inside the loop routine, you will notice that we read the values from the sensor every 1 sec

We also have place holders to display the read values and finally a place holder to add our
code to detect motion along the x and y axis.

Questions:

1. How do we control the sensitivity of our controller?

You might also like