Here's a new version of my libPropelleruino being used with the Arduino knob sample. To do that I'm using Martin Hodge's Propeller ASC coupled with TinkersALot ADC code and my Servo library. I took TinkersALot's code and Arduino-fied it to use pinMode, digitalRead, digitalWrite, and delayMicroseconds. In the process I introduced a rather insidious bug that broke his code. It turns out his delay function has a floor of 400 microseconds, while my Arduino version does not. But when I added that floor I broke my Servo library.
I'm embarrassed to say it took me all morning to figure out the conflict because the symptom wasn't obvious. Everything sort of worked but for certain values pulseOut (which uses delayMicroseconds) would freeze and lock the cog. Anyway here's the new code:
Nice work! Integrating code can be frought with hazard, but all is well that ends well. That 400 us floor is likely not needed, and could be cruft left over from my getting the adc code to work. So, it is likely very much better that is removed. What do you think of cogifying some of these features? That seems to be a natural next evolutionary step.
@Whit, thanks. @Tor, thanks I'll keep that in mind for the future.
@TinkersALot, the servo tending code already runs in a cog, but certainly moving other functions to cogs is something to keep in mind. What I may do is group a bunch of functions into a single cog as things progress.
@All, attached it the latest version of library with the Arduino stepper motor sample. I also added support for a simple Serial.println which is used in many sketches.
Hi, I finally bit the bullet and learned how to use code.google.com and GIT. So I've uploaded the libPropelleruino code and unit tests to the following repository:
If anyone is interested in using this library let me know what sort of documentation you'll need. If you want to add code for an uncovered Arduino function I'm more than willing to add contributors. Issue reports are also welcome.
Hi, I finally bit the bullet and learned how to use code.google.com and GIT. So I've uploaded the libPropelleruino code and unit tests to the following repository:
If anyone is interested in using this library let me know what sort of documentation you'll need. If you want to add code for an uncovered Arduino function I'm more than willing to add contributors. Issue reports are also welcome.
I have started working on SPIN code for the Radio Shack TFT Touch Screen Shield. I have not tested all functions but am working thru them as I get time, although it did display the color table from the wiki example. Hopefully might have it completed by the weekend. By the way, I am using the ASC+ board.
I have been looking at the 4 wire touch screen and this will not work on the ASC+ since we can not change the analog input pins to be outputs, digital or analog. So not all Arduino code will be compatible with out some software or hardware changes.
I realize this is an old thread. Looking for how to use libArduino/libPropelleruino in Simple IDE and not finding much documentation. I've read the docs on adding libraries, also tried to put all the files into a single project folder, not having much luck with it. Mostly seems due to pathing issues- complaints about not being to find the header files or the linker not being able to find the library components. Has anyone successfully gotten this to work? If so, how did you do it?
Hi Matt, I wrote the library a few years back and it does work. What I do is compile the library and then create a project under the tests directory. You need to modify the project so the include and lib paths can pull in the library. You should see something like this in the project file:
A modification is required to your source which is to add a "#include <Arduino.h>" at the top of the main file. This is because the SimpleIDE doesn't automatically include it like the Arduino IDE.
Comments
Nice work! Integrating code can be frought with hazard, but all is well that ends well. That 400 us floor is likely not needed, and could be cruft left over from my getting the adc code to work. So, it is likely very much better that is removed. What do you think of cogifying some of these features? That seems to be a natural next evolutionary step.
@TinkersALot, the servo tending code already runs in a cog, but certainly moving other functions to cogs is something to keep in mind. What I may do is group a bunch of functions into a single cog as things progress.
@All, attached it the latest version of library with the Arduino stepper motor sample. I also added support for a simple Serial.println which is used in many sketches.
StepperOneRev.zip
It ported over pretty easily except I still don't have support for the millis function, so I changed it to use delay instead.
https://code.google.com/p/lib-propelleruino/
If anyone is interested in using this library let me know what sort of documentation you'll need. If you want to add code for an uncovered Arduino function I'm more than willing to add contributors. Issue reports are also welcome.
This is a very valuable library for helping Arduino users who are intrigued by Propeller get involved.
I'll look into some packaging options to make using the library a little easier for folks that aren't interested in git or other source control.
Thanks.
I have been looking at the 4 wire touch screen and this will not work on the ASC+ since we can not change the analog input pins to be outputs, digital or analog. So not all Arduino code will be compatible with out some software or hardware changes.
thanks in advance ..
-I ../../libPropelleruino
-L ../../libPropelleruino
A modification is required to your source which is to add a "#include <Arduino.h>" at the top of the main file. This is because the SimpleIDE doesn't automatically include it like the Arduino IDE.