The FastLED library is an impressive piece of work:
After you download and install the library give it a try:
Using an Arduino Uno to calibrate an RGB LED strip.
The purpose of running this example is to determine what settings are needed to use the FastLED library. For this example I’m using an Arduino Uno. The Uno has a ground pin next to pin 13, so for convenience, I’m using pin 13 as a low-current Vcc for the RGB LED lights strip:
pinMode(13, OUTPUT); digitalWrite(13, HIGH); // The data pin is the pin we are using to connect to the Arduino. // Data pin that led data will be written out over #define DATA_PIN 12 // How many individual LED modules are on the strip? #define NUM_LEDS 10 // When using an SPI based chipset, the there should be four wires // Clock pin only needed for SPI based chipsets when not using hardware SPI //#define CLOCK_PIN 8
Important configuration setting is to specify the model of LED strips being used. May require some try-and-error.
// Uncomment one of the following lines for your leds arrangement. … // FastLED.addLeds<WS2811, DATA_PIN, RGB>(leds, NUM_LEDS); FastLED.addLeds<WS2812, DATA_PIN, RGB>(leds, NUM_LEDS); // FastLED.addLeds<WS2812B, DATA_PIN, GRB>(leds, NUM_LEDS); // FastLED.setBrightness(CRGB(255,255,255)); // FastLED.addLeds<GW6205, DATA_PIN, RGB>(leds, NUM_LEDS); …
A nice variety of color effects is included with the library. After trying out the RGBCalibration source code example, make the changes need to Demo Reel and give it a go: https://github.com/FastLED/FastLED/blob/master/examples/DemoReel100/DemoReel100.ino
Copy the settings for the LED strip to the DemoReel example
Upload and if all goes well, you should see a basic visual effects show.
- Why DIY when you could buy?
- Why Arduino when you can Pi?
- Making a Lightshow with Arduino
- Using a Raspberry Pi and USB Camera
- What is a “Smart” Garden?
- Starting a Smart Indoor Garden
Please share with friends and follow to receive a notification when I publish a new article.