Skip to content

Commit 82de421

Browse files
authored
Create Gyroscope.md
1 parent 28c3c92 commit 82de421

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

Gyroscope.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Gyroscope
2+
3+
I have a GY-521 (MPU-6050) shield that has both an accelerometer and a gyro in a single chip.
4+
5+
According to a few different links[[1](http://dummyscodes.blogspot.com.br/2014/07/mpu6050-gy-521-breakout-arduino-mega.html)][[2](http://forum.arduino.cc/index.php?topic=166113.0)] this shield has an onboard voltage regulator for 3.3V, which means that you can connect it to Arduino's 5V output without problems.
6+
7+
I'm using [I2CDevLib](https://github.com/jrowberg/i2cdevlib) to work with this shield, more specifically [this](https://github.com/jrowberg/i2cdevlib/tree/master/Arduino/I2Cdev) and [this](https://github.com/jrowberg/i2cdevlib/tree/master/Arduino/MPU6050).
8+
9+
## Connections
10+
11+
Shield | Arduino
12+
-------|--------
13+
VCC | 5V
14+
GND | GND
15+
SCL | Pin 21 (SCL)
16+
SDA | Pin 20 (SDA)
17+
INT | Pin 2 (interrupt 0)
18+
19+
## Testing
20+
21+
You can user [I2C Scanner](http://playground.arduino.cc/Main/I2cScanner) to check if the shield communication with your arduino is working properly.
22+
23+
The scanner will scan all I2C devices and report to the Serial Monitor.
24+
25+
```
26+
I2C Scanner
27+
Scanning...
28+
I2C device found at address 0x68 !
29+
done
30+
```
31+
32+
## Interrups
33+
34+
According to Arduino's [reference](http://arduino.cc/en/Reference/AttachInterrupt), Mega 2560 has 6 pins that can be used for interrupts: 2, 3, 18, 19, 20 and 21.

0 commit comments

Comments
 (0)