1 2 3 Previous Next 62 Replies Latest reply on Jul 31, 2020 9:44 PM by KyCl_4704321

    NeoPixel (WS2811/12) component


      A while back I posted some projects using a component I created for the WS2811/12 RGB LED modules.  I have added some updates including supporting both the WS2811 and WS2812.  Attached is a PSoC Creator workspace that include two projects and the StripLights library.                      Project “P4_OneRing” controls a single ring of these LED modules.  The second project “P4_MultiRings”, allows you to string multiple rings together to make your own very cool string of circular lighted ornaments. 


      We have a special Black Friday sale coming up this Friday to discount the PSoC 4 Pioneer Kit so you can make your own creation and afford to pick up some of these lights.



      Happy Holidays.


      Mark Hastings

        • 1. Re: NeoPixel (WS2811/12) component

          I ordered some led rings to try this out on, thanks for the post.




          This would make a nice PRoC application.




          Regards, Dana.

          • 2. Re: NeoPixel (WS2811/12) component

            Mark thanks for the Post! I find the NeoPixel (WS2811/12) component a neat and very useful component. I would like to use the “P4_OneRing” to controls Adafruit neopixels LEDs not necessarily connected in a ring. One requirements is to be able to modify the Strip_Lights component "LEDS_per_Strip" parameter at run time. Any suggestios or guidance on how this coud be done would be appreciated.





            • 3. Re: NeoPixel (WS2811/12) component



              You can just make the "LEDs_per_Strip" the maximum that you will use.  This parameter is used to allocate SRAM for the buffer, so changing it on the fly may not work with malloc since the entire SRAM buffer needs to be contiguous. The down side is that you take up more memory, and it will update more LEDs than you actually have, which takes longer.  You can update 1000 LEDs in 30ms so it's not a big problem, plus the ISR only requriees about 12% of the CPU.





              • 4. Re: NeoPixel (WS2811/12) component



                Your suggesting will work since I only require a maximun of 25 LED.





                • 5. Re: NeoPixel (WS2811/12) component

                   Thanks for this post and the component.




                  I'm new to soc community component and I not able to find how to install the component you provide (striplightlib.cylib) to be used in my own projet ?




                  Can you provide me a basic help ?




                  Thanks a lot.

                  • 6. Re: NeoPixel (WS2811/12) component

                    This should help -










                    Regards, Dana.

                    • 7. Re: NeoPixel (WS2811/12) component

                      I tried following that video for importing the component, and it complains that it cant find the componet's


                      so I'm not doing something properly. help!

                      • 8. Re: NeoPixel (WS2811/12) component

                        @meh, I tried to import from your archive, no luck. Followed the video


                        on Cypress website.




                        So then I exported component (your top schematic) into a new archive,


                        that worked. But then I did an import into a new project, compiled, and


                        get mismatching data types on the data line net. Also I noticed the import


                        only brought in part of the funlib, missed two other component versions


                        shown in that lib when I open your original posted archive....?




                        Additionally after import I wind up with 3 top level schematics in work space,


                        seems a little confusing.







                        Any possibility this could be cleaned up ? Seems like a highly useful


                        component in todays LED lighting world. A simple import into a users


                        design would be very useful I would think.




                        Regards, Dana.





                        • 9. Re: NeoPixel (WS2811/12) component

                          I think part of the issue is that this component isnt compatable with 3.2 of creator, 3.1 and it loads at least. havent tried to use it yet.. need a 32khz watch crystal for what I want. will a 12.5 load crystal work with the 22pf caps on the 059 dev board? 

                          • 10. Re: NeoPixel (WS2811/12) component

                            Yes, the Strip Light Controller is compatible with PSoC Creator 3.1 and 3.2.  When you get an error like what is shown, it means that your dependencies are not correct. 




                            1) Right click on the project name in the Workspace Explorer and select "Dependencies".


                            2) Look under "User Dependencies", if the "StripLightLib" is not shown you need to add it.


                            3) To add a library to the project, click on the folder icon to the right of "User Dependencies".


                            4) Navigate to the location at which you have stored the library and select "StripLightLib.cyprj".  It should be a file inside a folder of named "StripLightLib.cylib".


                            5) Press "OK" and you should be ready to go.


                            I attached the latest released version.



                            • 11. Re: NeoPixel (WS2811/12) component

                              @meh, just to confirm, then if I want a single project folder that I point


                              to in Dependancies I extract the project archive to the principal


                              design folder for the overall project ? Then set the dependencies.


                              This way I would avoid having a folder outside workspace that


                              would, if clobbered, moved, etc.. would not hose the design ?




                              Regards, Dana.

                              • 12. Re: NeoPixel (WS2811/12) component

                                This might help, and incorrect cap loading may or may not start up


                                osc, and certainly will result in a freq deviation from spec sheet.






                                          http://www.cypress.com/?rID=37884     AN54439 - PSoC® 3 and PSoC 5LP External Crystal Oscillators




                                Regards, Dana.

                                • 13. Re: NeoPixel (WS2811/12) component

                                  You can put a library folder almost anywhere.  I have a folder in my Windows computer that I keep all my libraries in so that I can use them with multiple projects.


                                  MEH/My LIbs/PSoC_Creator/


                                  I keep all my custom Creator libraries there so I don't need to go looking in specific projects for them and I have just one copy of the latest that way.


                                  MEH/My LIbs/PSoC_Creator/StripLightLib.cylib


                                  When you archieve a project, it will put the libraries that you have been using in a sub-directory under your workspace.





                                  • 14. Re: NeoPixel (WS2811/12) component

                                    keep up the good work, waiting on parts to actually try to see if my code works or not. I"m going to build a simple neopixel ring clock, using a 24 and 60 led rings.. using 2 copys of this component and the RTC component, and a uart one to read a gps to get the time set. I dont feel like trying to code my own switches for setting, but I will do that if I can get the gps to give me the time.

                                    1 2 3 Previous Next