Read data from MPU6050 with i2c.
var i2c = ;var MPU6050 = ;var address = 0x68;var i2c1 = i2c;var sensor = i2c1 address;var data = sensor;console;
Values are in degrees.
- MPU6050 datasheet: http://www.invensense.com/mems/gyro/documents/RM-MPU-6000A-00v4.2.pdf
- MPU6050 on I2Cdevlib: http://www.i2cdevlib.com/devices/mpu6050#registers
- How to set up i2c:https://learn.adafruit.com/adafruits-raspberry-pi-lesson-4-gpio-setup/configuring-i2c
- Allow i2c to be used without root privileges:
sudo usermod -G i2c pithen logout and login