NeoPixel from Adafruit library: automatic


#1

Here’s the screen shot of the first working program. Turns 1st pixel red, then turns it off and turns the next green. Impressive!

This is a proof-of-concept for mechanically producing a XOD library from an Arduino library. I fed the Adafruit Neopixel library in, and got a XOD library out. Pretending there are no further bugs, I could do this for most Arduino libraries.

Code for doing the conversion (and the generated XOD library, and this example) is at: https://github.com/awgrover/arduino-2-xod.

I just finished, and it’s 11pm. So, It’s too late to do more of a write up. Look for more on this topic this week.


#2

Incredible, very good job :clap::clap:


#3

:astonished: This is amazing. I was very sceptical regarding to automatic conversion of a C++ library to a XOD library (actually about conversion of C++ to anything), but you broke my arrogance.

And although there are still questions to consider (delays, data types friction, etc) it looks viable. Thank you for sharing!


#4

Wow this will make things a lot easier. :smile::smile:
Any chance you can publish this to Libraries?
so i can compare?
https://xod.io/libs/bradzilla84/neopixel/


#5

I upload it manually, but I do not see the output pin to the port :neutral_face:


#6

Yea looking at it now…
Looks promising :smile:


#7

@cesars, @bradzilla84
I need to write up a lot about this. I plan on doing some later today.

the output pin is in the “constructor”: “adafruitneopixel” patch. It’s “p”.

The library is, as you discovered, in the github for manual loading. That’s one of the things: naming. It’s a mechanical translation from Adafruit, so author name? And I want to indicate that it is a low-level-rough-translation.

Beware, this is just a proof of concept! So, not really intended for real use yet. But, if you are happy playing with it to help discover issues, that’s what we need.