Can anyone tell me how to implement the lcd library in IDE 0.0.5. Must i create a new directory like in the Arduino IDE environment or what else ?
Implementing Libraries
(2 posts) (2 voices)-
Posted 5 years ago #
-
Hi starbug!
We kept the arduino 0018 library system: if you add them to a "library" directory in your sketchbook directory they should pop up in the Examples and be import-able the same way as with Arduino.
However, the "meat" of the porting process for most libraries is rewriting the bundled C code that is more platform specific.
One simple issue you'll probably run into right off the bat (I did when testing with the PID library) is that you'll have to change any include statements referencing "
wiring.h
" to "wirish.h
" because we renamed that in libmaple. Otherwise you'll get a compiler error like:
/home/bnewbold/code/sketches/libraries/PID_Beta6/PID_Beta6.cpp:2: fatal error: wiring.h: No such file or directory
This was an unexpected side effect; if it becomes an issue we might auto-fix this compilation error, rename our files, or something similar. We wanted to distinguish our "wirish" implementation of the Arduino language because it's not 100% identical to the regular AVR Arduino implementation.
Another potential bummer is that libmaple is still under development and any C code depending on its API might break; the dust should settle once we finish porting to maple native and do the 0.1.0 stable release. Exposed wirish functions (like digitalWrite) are much less likely to change.
I intend to update the "porting libraries" part of the documentation with more tips after 0.1.0 and I get a chance to port a few more myself; let me know if you have tips for future porters, and thanks for taking a whack at the LCD library!
Posted 5 years ago #
Reply
You must log in to post.