Pure Data external for the MPU6050 motion sensor.
Based on code from alex-mous' MPU6050 library and rfetick's MPU6050_light for Arduino.
- Install the GY-521 as shown in this video. Also enable i2c.
- Install libraries:
sudo apt-get install libi2c-dev i2c-tools libi2c0
. - Go to the mpu6050rpi directory and type
make
. - In Pure Data, go to Preferences->Path and add the path of the mpu6050rpi directory.
Add the [mpu6050rpi]
external to your Pure Data patch. Right-click and select help.
Due to my limited knowledge of C, the code could probably use some restructuring. Do refactor! School me!