Comments: SparkFun Blocks for Intel® Edison - 9 Degrees of Freedom Block
Looking for answers to technical questions?
We welcome your comments and suggestions below. However, if you are looking for solutions to technical questions please see our Technical Assistance page.
If you've found an issue with this tutorial content, please send us your feedback!
-------------------- Tech Support Tips/Troubleshooting/Common Issues --------------------
Reading 9DOF Block via I2C w/ the Arduino IDE
The mraa library and Eclipse is an alternative as opposed using the Arduino IDE. The are a few other ways (like Node.js in the Intel XDK) to program the Intel Edison. You can use the LSM9DS0 Arduino library to view the sensor data. You will need to modify board definition in order to get it working. "Basically the Arduino expander board is hard-coded to I2C6, while the Sparkfun board on I2C1. However, both I2C6 and I2C1 are present on the breakout board." This issue is discussed in the Intel Edison Forums [ https://communities.intel.com/message/253549#253549 ]. You will have an output will be constant and not change. Here are some examples of the output that you might see that are not changing:
or
The output will vary depending on the each upload, state of the Edison, and the floating I2C pins. Regardless, the output values willremain constant.
Here are two solutions and steps to get the Intel Edison and the 9DOF block working on an Arduino IDE:
A.) Intel's custom Arduino IDE v1.5.3 and v1.6.0
It's pretty simple if you are using Intel's Arduino IDE v1.6.0, Intel Edison, the 9DOF block, and a Base block/Arduino breakout for Intel Edison . The customers that I have helped since the release of the 9DOF block have gotten theirs to work without an issue.
You just need to follow these steps (assuming that you are using a Windows OS):
1.) Download Intel's Arduino IDE v.1.6.0 [ https://software.intel.com/en-us/articles/arduino-ide-v160-for-intel-galileo-and-intel-edison-boards ].
2.) Unzip the files.
3.) Go to the folder edison_fab_c in the Arduino program folder to open the variants.h file in a text editor. Your directory should look like:
You must modify the line as explained in the Intel Edison forum on line 49 of the variants.h file by changing:
to
4.) Install the LSM9DS0 Arduino library [ https://github.com/sparkfun/SparkFun_LSM9DS0_Arduino_Library/tree/V_1.0.1 ] for the LSM9DS0 breakout in your Arduino libraries folder located in your documents (it will probably look like C:\Users\…\Documents\Arduino\libraries ). You can also use your "libraries manager" located in "Sketch>Include Library>Manage Libraries..." .
5.) To test, you can use the LSM9DS0_Simple.ino Arduino example code [ https://github.com/sparkfun/LSM9DS0_Breakout/blob/master/Libraries/Arduino/examples/SparkFun_LSM9DS0_Simple/SparkFun_LSM9DS0_Simple.ino ] on the Intel Edison. Open the Arduino example code in Intel's modified Arduino IDE v.1.6.0.
6.) Select the "Intel Edison" board definition in Tools>Board . For Intel's version of the Arduino IDE, it should be already installed in the custom Arduino IDE for the Intel Edison.
7.) Select the COM port in Tools>Port that the Intel Edison enumerated on. In your device manager, it should say " Intel Edison Virtual Com Port (COM#) ".
8.) Hit the "Upload" button.
9.) Open the Arduino serial monitor.
10.) Select a baud rate of 115200 to view the output data from the LSM9DS0 .
B.) Arduino.cc's Arduino IDE v1.6.10 and .1.6.11
I was able to find the location Intel Edison Board definition in the Arduino program folder and get it working with the latest Arduino IDE v.1.6.11. You will still need to modify the variants.h file. There really is no way around this. I compared and contrasted the files using a tool online to verify between Intel's custom IDE and Arduino.cc's IDE. There was no difference between the variants.h file. Just follow these steps:
1.) Open your Arduino IDE v1.6.11.
2.) Open the "Board Manager" in the Tools/Board: menu.
3.) Make sure that you have the " Intel i686 Boards by Intel version 1.6.7+1.0 " board definition installed. If it is not, just update the board definition.
4.) Then head to your Arduino preferences by going to File>Preferences .
5.) Click on the link "C:\Users\…\AppData\Local\Arduino15" to modify the program files where it says:
Keep in mind the "…" will vary depending on the user's name that is logged in to your Windows OS.
6.) Open the " packages " folder.
7.) Open the " Intel " folder.
8.) Open the " hardware " folder.
9.) Open the " i686 " folder.
10.) If you have the correct board definition installed for the Intel Edison, you should see a folder called "1.6.7+1.0" Open the "1.6.7+1.0" folder.
11.) Open the " variants " folder.
12.) Open the " edison_fab_c " folder. Your directory should be similar to this:
13.) You must modify the line as explained in the forum on line 49 of the variants.h file by changing:
to
14.) Select the " Intel Edison " board definition in Tools>Board .
15.) Select the COM port in Tools>Port that the Intel Edison enumerated to. In your device manager, it should say " Intel Edison Virtual Com Port (COM#) ".
16.) Hit the "Upload" button.
17.) Open the Arduino serial monitor.
18.) Select a baud rate of 115200 to view the output data from the LSM9DS0 .
------------------------------------------------------------------------------------------
Reading the 9DOF Block via SPI
It's not supported with SPI. Go back to using I2C. For more information, check out this forum post => https://communities.intel.com/message/297870#297870
------------------------------------------------------------------------------------------
Issues Stacking Intel Edison Blocks
I had a case where was an issue stacking the blocks a certain way with the Intel Edison. Apparently if you stack the boards like so:
, you might not be able to access the sensor data. Try rearranging the blocks like so to get it to output the sensor data:
------------------------------------------------------------------------------------------
Additional Resources and Project Applications
Example of the 9DOF block used in a balance bot example => hackaday.com/2015/02/24/eddieplus-the-edison-based-balancing-robot/. There is example code in the GitHub repository to use the data output from the 9DOF => https://github.com/r3n33/EddieBalance/blob/master/src/imu/imu.c.
Another example project => http://stephaniemoyerman.com/?p=81 .
I gotta say, this block worked perfectly for me first time! I used Eclipse per the instructions, and it compiled, uploaded to the Edison and ran like a champ! It was refreshing to see the documentation, screenshots, and suggestions perfectly in-sync with the software downloads and hardware.