In the last posts I managed to get the Intel Edison running on both Laptop and Computer.
I was having some issues with OneWire and the I2C library to drive the LCD display.
This post discusses how the Arduino IDE handles libraries ... or should ....
Intel Arduino IDE 1.0.4 for Windows
Intel have produced their own IDE to better handle the Intel Edison, so I thought it was only fair I try it, rather than the Arduino release.
I had mentioned the problems of names exceeding the 260 characters back here
The file is available here (the guide takes you there)
which takes you to here.
This time I wasn't going to get caught out, and installed it in C:\Intel
I fired up the IDE and it's based on Arduino 1.5.3 but with with the Intel stuff already installed, and most others bits removed.
Trying my test file, I had to install an I2C library for the display.
I had tried this library (LiquidCrystal_PCF8574) but it became too difficult, so I switched to one that should have worked.
Despite trying to add the library using the Library Manager, and it appearing in the C:\Intel\libraries folder, it brings up errors.
Arduino: 1.5.3-Intel.1.0.4 (Windows 7), Board: "Intel® Edison" Intel_Edison_I2C_LCD.ino:66:37: fatal error: Adafruit_RGBLCDShield.h: No such file or directory compilation terminated.
I can install it into the IDE libraries folder, and restart the IDE, it still ignores it.
I've spent a couple of days (well mostly into the wee hours of the nights) trying to get this working, behaving or accepting a library.
I also tripped across some answers about libraries that I'll detail below.
Intel talk about installing the Arduino IDE and then point you to the Arduino release, rather than their own version.
It talks about testing with 1.6.9 which was the latest at the time, but it links to the latest download (currently 1.8.1)
You'll need to add the Intel board, but I can assure you adding libraries is not as frustrating as it is using the other one.
I never did install Arduino 1.5.3 so maybe that is where the problem is ....
So I'm now pondering what benefits the Intel version has.??
Arduino Library specs
During my Library install exercises, I ran into some errors I'd never come across before.
Some of the messages were ...... less than helpful and could lead you up the garden path.
In the end I tripped over this document that helped explain some .... BUT not all the messages.
Some time ago the Arduino IDE matured, and they changed a few files that the IDE uses.
You often had a library that didn't work on one version (023 or 1.xx) or the other and it needed some cleaning up.
You now see a line that checks which IDE version and will change the file used, so one library can handle old and new IDE's ...
In order to benefit the open source community a guideline has been produced, and how to get your library into the IDE builds.
I suspect there was nothing wrong with any of the libraries I was trying to add, it's simply the IDE that was at fault.
In one attempt I had it complain about the lack of email, yet this is an option according to the spec.
I cured it by adding email = on a new line, and that error went away.
The next issues were with the Licence, but since it didn't say what exactly was wrong with it, I couldn't fix it.
What is interesting is that the Arduino 1.8.1 that I had installed, happily imported the same libraries and without the protests about Licence or resources, etc.
I could add them into the IDE\libraries folder and it picked them up when the IDE started.
So why Arduino 1.5.3 (which is what the Intel version is based on) makes life difficult/impossible is strange.
In an earlier post (First Steps - Intel Edison Arduino 2 ) I was curious about why libraries added were not added to the IDE install location.
The default location is under your username, but if you specify where the sketches are stored, it uses that location.
There is a guide here by Limor Fried (Adafruit)
The last few lines explains why.
Please note: the way libraries are chosen during compilation is designed to allow the update of libraries present in the distribution. This means that placing a library in the “libraries” folder in your sketchbook overrides the other libraries versions.
The same happens for the libraries present in additional cores installations. It is also important to note that the version of the library you put in your sketchbook may be lower than the one in the distribution or core folders, nevertheless it will be the one used during compilation. When you select a specific core for your board, the libraries present in the core’s folder are used instead of the same libraries present in the IDE distribution folder.
Last, but not least important is the way the Arduino Software (IDE) upgrades itself: all the files in Programs/Arduino (or the folder where you installed the IDE) are deleted and a new folder is created with fresh content.
This is why we assume that your libraries are properly put in your sketchbook folder and therefore they are not deleted during the Arduino Software (IDE) update process.
I sometimes work on my sketches on my Laptop, and like to keep the two IDE installations the same.
I simply copy it across using a memory stick, but this different location makes it a much harder task now.
It also means that if you don't have a shared space for sketches, you'll need to repeat the add libraries and boards for each user.
I do recommend ticking the' verbose during compilation' in the preferences.
"C:\Users\xxxxxxx\AppData\Local\Arduino15\packages\Intel\tools\core2-32-poky-linux\1.6.2+1.0/pokysdk/usr/bin/i586-poky-linux/i586-poky-linux-g++" -m32 -march=i586 "--sysroot=C:\Users\xxxxxx\AppData\Local\Arduino15\packages\Intel\tools\core2-32-poky-linux\1.6.2+1.0/core2-32-poky-linux" -Os -Wl,--gc-sections -march=i686 -o "C:\Users\Beckettm\AppData\Local\Temp\arduino_build_78567/Intel_Edison_I2C_LCD.ino.elf" "C:\Users\Beckettm\AppData\Local\Temp\arduino_build_78567\sketch\Intel_Edison_I2C_LCD.ino.cpp.o" "C:\Users\Beckettm\AppData\Local\Temp\arduino_build_78567\libraries\LiquidCrystal_PCF8574\LiquidCrystal_PCF8574.cpp.o" "C:\Users\Beckettm\AppData\Local\Temp\arduino_build_78567\libraries\OneWire\OneWire.cpp.o" "C:\Users\Beckettm\AppData\Local\Temp\arduino_build_78567\libraries\Wire\Wire.cpp.o" "C:\Users\Beckettm\AppData\Local\Temp\arduino_build_78567\core\variant.cpp.o" "C:\Users\Beckettm\AppData\Local\Temp\arduino_build_78567/core\core.a" "-LC:\Users\Beckettm\AppData\Local\Temp\arduino_build_78567" -lm -lpthread "C:\Users\xxxxxxx\AppData\Local\Arduino15\packages\Intel\tools\core2-32-poky-linux\1.6.2+1.0/pokysdk/usr/bin/i586-poky-linux/i586-poky-linux-strip" "C:\Users\xxxxxx\AppData\Local\Temp\arduino_build_78567/Intel_Edison_I2C_LCD.ino.elf" Multiple libraries were found for "OneWire.h" Used: C:\Users\xxxxx\AppData\Local\Arduino15\packages\Intel\hardware\i686\1.6.7+1.0\libraries\OneWire Not used: C:\Development\Arduino\arduino-1.8.1\libraries\OneWire Multiple libraries were found for "Wire.h" Used: C:\Users\xxxxxxx\AppData\Local\Arduino15\packages\Intel\hardware\i686\1.6.7+1.0\libraries\Wire Not used: C:\Users\xxxxxxx\AppData\Local\Arduino15\packages\Intel\hardware\i686\1.6.7+1.0\libraries\Servo Using library LiquidCrystal_PCF8574 at version 1.1.0 in folder: C:\Development\Arduino\arduino-1.8.1\libraries\LiquidCrystal_PCF8574 Using library OneWire at version 1.0 in folder: C:\Users\xxxxxxx\AppData\Local\Arduino15\packages\Intel\hardware\i686\1.6.7+1.0\libraries\OneWire Using library Wire at version 1.0 in folder: C:\Users\xxxxxxx\AppData\Local\Arduino15\packages\Intel\hardware\i686\1.6.7+1.0\libraries\Wire Sketch uses 88214 bytes (0%) of program storage space. Maximum is 10000000 bytes.
This provided some interesting information about which file was used based on the hardware to determine which library it would use.
Line 04 suggests it picked the appropriate library, based on line 3 of the statement.
So this verifies that despite installing other One Wire libraries, it is using the one in the distribution and therefore SHOULD work.
It's always gratifying to see that a manufacturer has tested their product, and provide the evidence.
The document below is the results of testing the Intel Edison against some existing hardware that a user might be expected to use.
It also makes some suggestions about how to resolve some issues, but be aware the libraries may have been updated since then.
I like that it includes the links ..... very nice
So by now I think I've saved you several days of heartache and pain.
Donations can be made to ... just kidding ..
I have enjoyed this little venture into using the Intel Edison.
I am glad that I used a sketch that I know works, rather than create something from scratch.
This started as a simple blog, but has now grown over a few posts, so an index is appropriate.