I2CDEV MPU-6050 6-axis accelerometer/gyroscope Arduino Library adapted for Spark Core by Paul Kourany, April 2015
The MPU6050 combines a 3-axis gyroscope and a 3-axis accelerometer on the same silicon die together with an onboard Digital Motion Processor(DMP) which processes complex 6-axis MotionFusion algorithms.
https://github.com/jrowberg/i2cdevlib/tree/master/Arduino/MPU6050
http://www.i2cdevlib.com/devices/mpu6050#source
- Open the Web based IDE on the Spark.io website.
- Click on the Library button on the left hand side of the IDE. It looks like a little banner or flag...
- Click "Contribute Library" button at the top of the panel that folded out.
- Paste "JamesHagerman/MPU6050" into the text field (without quotes, of course).
- Click "Add Repository".
- Make sure the main window in the IDE says "Library is valid. Ready to import." at the top.
- Click "Import".
- Click "Got it, Proceed" if it asks you. This is basically because the True MPU6050 library is already there (but it's broken otherwise you wouldn't be reading this...)
- You're done!
Look at the next section to actually use the library in a project. The "Use this example" button doesn't work with this library quite yet.
- Create a new project in the Web based IDE on the Spark.io website. Remember the name for step 6.
- Click the Library button the left hand side of the IDE. It still looks like a little banner or flag...
- Select the MPU6050 Library from under the "My Libraries" section.
- Make sure the version is at least "1.0.1"
- Click "Include in App"
- Select the app you just created (or whatever app you wanna use this library in)
- Click "Add to this App"
- You're done!
Now you just need some example code, right? You can find a (hopefully) working example at:
examples/spark_ide_example.c
You'll probably need to modify it pretty heavily to get it to do what you wanna do but at least it's spitting out data now!
Good luck!