Shop OBEX P1 Docs P2 Docs Learn Events
SimpleIDE program for Neopixels 2811 through 6812RGBW - Page 2 — Parallax Forums

SimpleIDE program for Neopixels 2811 through 6812RGBW

2»

Comments

  • It looks like my copy of this library is different than what you posted at the top of this thread. I suspect the lower level parts and the PASM driver are the same though. I wonder how easy it would be to merge your changes into this code or maybe just replace the appropriate files. I think the main difference between this and what you posted is that I pulled each function out into a separate source file to make it work better as a library.
  • It looks like you have made some great changes to the older code I was using. I would be happy to go through and make the necessary changes to support RGBW using the file structure you are using.

    As you probably noticed the code I posted includes a change to use "rgbx" instead of "ws2812" as it can run many different strips. Unfortunately for that reason it makes it not quite plug and play with what you have set up. When I make the new changes can I continue using that "rgbx" format or should I go back to "ws2812" for conformity?

    Thanks again
  • Kednerpo wrote: »
    It looks like you have made some great changes to the older code I was using. I would be happy to go through and make the necessary changes to support RGBW using the file structure you are using.

    As you probably noticed the code I posted includes a change to use "rgbx" instead of "ws2812" as it can run many different strips. Unfortunately for that reason it makes it not quite plug and play with what you have set up. When I make the new changes can I continue using that "rgbx" format or should I go back to "ws2812" for conformity?

    Thanks again
    No, you can stick with rgbx_ since the new code works with different RGB LEDs.
  • Here is a quick modified version. It still uses the ws2812 format vs rgbx but if I'm on the right track I will start that process next.

    I did make the change to
    #define COLOR(r, g, b, w)      (((r) <<24) | ((g) << 16)| ((b) << 8) | (w))
    
    but I am still noticing the extra pixels illuminating
  • Another attempt.

    I cleaned up mistakes I made in last night's code and added the rgbx formatting.

  • Sorry, I've been out of town on vacation for the past week. I'll try to look at this sometime soon. Thanks!
  • No problem. Thanks.
  • I just looked at your modified version of my code. One obvious issue that might have been in my original code is the implementation of the rgbx_close function. It calls itself! In fact, I don't see any code that would stop the COG. Secondarily, do you know if this code is currently being distributed by Parallax? It looks like a lot of it including rgbx_start were written to follow their pattern of burying malloc/free calls inside of library functions and using global variables. I think I added that code when I tried to submit my code for the Simple Library but I'm not sure if they actually used it. If not, I think that code should be removed. I can create a pared down set of functions that eliminates the stuff needed to conform with the Simple Libraries approach if you want. This would pretty much get rid of all of the _open, _close, and _start functions and just leave the _init functions.
Sign In or Register to comment.