Arduino FastLED Library

RGB Strip

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:

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.



Please share with friends and follow to receive a notification when I publish a new article.


Existential Crisis

1 Comment

  1. I’m not that much of a online reader to be honest but your sites really nice, keep it up! I’ll go ahead and bookmark your site to come back later. All the best


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.