Jump to content

I 've been playing with one of my ws2812b led strips, and made a cool christmas light strand out...


G+_52Degrees
 Share

Recommended Posts

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

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

 Share

×
×
  • Create New...