I have successfully ported the Adafruit_Pixie-library for their 3W-serial LEDs, not to be confused with the ‘Pixy’-camera, also distributed and librarised by Adafruit, simply by adding the spurrious sniplet:
@dial I’m also using the Pixie with my Photon. I added the snippet you posted to the .h file found here. Then I used their example code, which worked great after removing the SoftwareSerial code in favor of Serial1 (the comments in their example helped quite a bit here). Seems like this should be added to the library set so others don’t have to spend the hour I did getting this to work
I've had no issues. I powered the Photon (or Core) with USB and the Pixie via VIN ignoring the little dropdown.
The data line goes directly to the Photon via SoftwareSerial, or in case of the core directly:
I’ve made an improvement to the Adafruit library so that each Pixie’s brightness can be controlled individually. The hardware is totally capable, but the library didn’t come with support for this. I’m testing the new version now and still cleaning up the code to bring back as many of the Adafruit features as I can. Code can be found here
What do you guys think?
Do you like the function setPixelColor(uint16_t n, uint8_t r, uint8_t g, uint8_t b, uint8_t brightness) or keep it as it was, setPixelColor(uint16_t n, uint8_t r, uint8_t g, uint8_t b), and instead change setBrightness(uint8_t b) to setBrightness(uint16_t n, uint8_t b) where n is the strip number?
Should I make an effort to port the original setBrightness(uint8_t b) so that one can continue to change the brightness of every light with one function?
I would not mess with color models. RGB is the most technical and I know how to work with.
I have seen the functions inside the library and do not quite understand what he is doing there. The author is probably referring to his code in the implementation of the Pixie itself, so maybe you want to look there.
I myself would use a clean hue-saturation approach, maybe with some mapping to create a much more linear experience. In other word, I am avoiding that function.