The fastLED library for Arduino enables you to easily programme LED animations on addressable RGB LED strips. In this project, you’ll learn the basics that will set you off on your LED journey!
Ensure that the capacitor is connected respecting its polarity. The leg with the arrow and “-” sign should connect to the ground rail.
When connecting LED strips to any live power source or microcontroller, CONNECT GROUND (–) BEFORE ANYTHING ELSE. Conversely, disconnect ground last when separating.
Although the capacitor is not strictly necessary in our case, it is good practice to add it so as to avoid damaging the LEDs when powering the circuit from a DC power source other than the Arduino’s 5V pin. In our example, the Arduino is capable of powering the LED’s but in cases where there are more LEDs, a separate power source should be used.
After a few seconds, the LED strip will start cycling through the animations in the DemoReel sketch.
Please note that if you’re running more LED’s than specified in this project it is advisable to use a dedicated power supply for the LED’s as the Arduino’s USB connection will limit the power consumption to 500mA. You can work out the maximum current required by multiplying the number of pixels by 20 and dividing by 1000. In our case, this calculation gives us 1.2A but bear in mind that this is the MAXIMUM draw. In practice, when the LEDs are animated they will rarely be all on at the maximum brightness at the same time so we can get away with powering through USB.
Now you have the basic showreel running, you can have a look at some of the other demos included with FastLED.
Once you are familiar with the demos, you can dive deeper into the code and start customising your animations. You can find more info and resources here.
From a quick tap to smashing that love button and show how much you enjoyed this project.