Skip to content

Latest commit

 

History

History
34 lines (23 loc) · 1.28 KB

Gyroscope.md

File metadata and controls

34 lines (23 loc) · 1.28 KB

Gyroscope

I have a GY-521 (MPU-6050) shield that has both an accelerometer and a gyro in a single chip.

According to a few different links[1][2] this shield has an onboard voltage regulator for 3.3V, which means that you can connect it to Arduino's 5V output without problems.

I'm using I2CDevLib to work with this shield, more specifically this and this.

Connections

Shield Arduino
VCC 5V
GND GND
SCL Pin 21 (SCL)
SDA Pin 20 (SDA)
INT Pin 2 (interrupt 0)

Testing

You can user I2C Scanner to check if the shield communication with your arduino is working properly.

The scanner will scan all I2C devices and report to the Serial Monitor.

I2C Scanner
Scanning...
I2C device found at address 0x68  !
done

Interrups

According to Arduino's reference, Mega 2560 has 6 pins that can be used for interrupts: 2, 3, 18, 19, 20 and 21.