Monday, December 17, 2007

Adding Libraries to Arduino - 0010

I'm not sure if the way that libraries are setup has drastically changed since Arduino - 0004 or what, but the tutorial for using an 8 bit LCD display by using the "LiquidCrystal" library needs to be corrected. In this tutorial it says to download the zip file and then paste the "LiquidCrystal" folder into the "arduino-0004\lib\targets\libraries" folder. I assumed maybe that there was a corresponding "arduino-0010\lib\targets\libraries" folder in the latest version of the IDE. I was wrong. There is only a "arduino-0010\lib" folder. I therefore created subfolders to match the file path given, resulting in "arduino-0010\lib\targets\libraries". This did nothing for me. I then tried to just paste the library into the "arduino-0010\lib" folder but this too did not result in the library being visible in the Sketch>Import Library menu. Knowing that there were libraries already working in the Arduino IDE I did a search for *.h and found the import libraries to all be saved in the "arduino-0010\hardware\libraries" folder. I pasted the library into that folder, and presto, it worked! OK, so that's not entirely true. The Arduino IDE listed it in the Import Library menu however it gave a weird error at the bottom of the window. I then tried the 4 bit version and it shows up without an error. That's fine with me as the 4 bit requires fewer wires. I'll have to get it wired up and put up a post soon. Anyway, to sum up what I've found regarding loading libraries into the Arduino IDE(version 0010); paste them into "arduino-0010\hardware\libraries".

No comments: