G+_52Degrees Posted December 19, 2016 Share Posted December 19, 2016 I've been playing with one of my ws2812b led strips, and made a cool christmas light strand out of them, but I had to call each led individually in order to get my repeating pattern. How do I repeat my color array (FastLED and Arduino Uno) so I only have to add or change colors one time in my program? Link to comment Share on other sites More sharing options...
G+_David Wiggins Posted December 19, 2016 Share Posted December 19, 2016 I'm still learning this part myself, but the idea is you define the array(s) first (in setup,I think), then call it in the loop under whatever conditions you define (button, pot, timer. . .). The idea is your constants, variables, arrays, and functions are defined first, and the loop is conditions and calls, therefore small/efficient. Someone better than me can explain better with examples. Also, I posted a few days ago a cool Arduino simulator, be l but I think It got lost in the press:. circuits.io - Bring ideas to life with free online Arduino simulator and PCB apps | Autodesk Circuits . It's another Autodesk offering, like TinkerCAD. I use it when I can't pull out my kit but want to work. Link to comment Share on other sites More sharing options...
G+_Ben Reese Posted December 20, 2016 Share Posted December 20, 2016 I haven't done anything with WS2812 stripes yet, but that's how it works from the way it's been described. You can update them all to the same value, but each has to be updated. Perhaps you can update just up to the one you want changed? Link to comment Share on other sites More sharing options...
G+_Arcturus Lancaster Posted December 20, 2016 Share Posted December 20, 2016 Setup your pattern in an array and use a for loop to update the string. Link to comment Share on other sites More sharing options...
Recommended Posts