Arduino FastLED Library

RGB Strip

The FastLED library is an impressive piece of work:

https://github.com/FastLED/FastLED/wiki/Basic-usage

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.

Lightshow

 

 

One thought on “Arduino FastLED Library

Leave a Reply

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

WordPress.com Logo

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

Google+ photo

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

Twitter picture

You are commenting using your Twitter 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.