Developing for the Propeller using the Arduino core
in Propeller 1
Hey,
I've played with the IDEs supplied by Parallax and came to the conclusion that there might be value in permitting users to take advantage of a multitude of libraries for the Arduino,
assuming the core would be ported to run on the Propeller.
Has anyone looked into this?
-J
I've played with the IDEs supplied by Parallax and came to the conclusion that there might be value in permitting users to take advantage of a multitude of libraries for the Arduino,
assuming the core would be ported to run on the Propeller.
Has anyone looked into this?
-J

Comments
Indeed this idea has been discussed here over the years. In fact I have an Arduino form factor board with a Propeller instead of a AVR on it. The PropASC board. There has been work on getting some Arduino API's working on that board. Not being an Arduino guy I did not follow how far that got.
https://code.google.com/archive/p/lib-propelleruino/
I have not tried it myself, but the goal was to port the Arduino libraries to the Propeller. Combined with the Propeller ASC (or Propeller ASC+) it might make for a nice environment.
I have converted a few Arduino programs to use my own PropWare HAL and it has been pretty easy for the most part. Look at Printer for a serial API and use pwOut as a global instance, comparable to Arduino's "Serial".
There are a couple philosophical differences.
1) I think programmers are capable of writing their own main function, so I do not provide one via PropWare.
2) Because of the Propeller's native waitcnt instruction/function, I do not provide a delay function. I think users are better off learning how to use waitcnt.
So Arduino code like this...
void setup() { Serial.begin(9600); } void loop() { Serial.println("Hello world!"); delay(1000); }Could be turned into code that compiles with PropWare like so
void setup() { // No serial setup needed - defaults will do just fine } void loop() { // `pwOut` is a global instance of the PropWare::Printer class. It will be // optimized out by GCC if unused in your code pwOut.println("Hello world!"); waitcnt(1000 * MILLISECOND + CNT); } int main () { setup(); while (1) { loop(); } }Not only are they still available, they are plentiful. And considering the power of the Propeller, they are a great value for the money.
http://mghdesigns.com/propeller/mgh-designs/propeller-asc-arduino-shield-compatible-1.html
Parallax has a few too.
https://www.parallax.com/product/32214
Actually I don't have my PropASC board. I loaned it to a friend who had never heard of a Propeller but uses Arduino. He liked it so much I never got in back!
The PropASC is a great little Propeller board even if you don't need any Arduino compatibility.
I should order some more...
From my perspective, I think the value would be within reusing existing code libraries (they're pretty much click-to-install kind of thing), rather than having pin compatibility with boards.
https://github.com/Martin-H1/libArduino
I wouldn't say this project is abandoned. It's more that it does what I want so I am not adding new features. If anyone wants to extend it I am always willing to incorporate them.