Accessing the accelerometer from the Arduino IDE
Now that the two devices are connected, you'll need to bring up the Arduino IDE and add a library so that you can access the functionality from the SW. Follow these steps:
Go to github.com/jrowberg/i2cdevlib and look on the right-hand side of the page for the download link. This will download the entire library.
Note
From the SparkFun page on the device at www.sparkfun.com/products/11028, you'll find a GitHub repository that supports not only this device, but a number of devices that use the I2C interface.
Now, you should unzip the file to a handy location; I unzipped mine in the
Downloads
directory. What you want is just the files associated with Arduino, so go to the directory that supports those files, as shown in the following screenshot:Even though you won't need all of these libraries right now, you can just copy all of these to your
Libraries
directory of your Arduino for future use. You'll notice, by the way, that there is a duplicate...