The FastLED library for colored LED animation on Arduino. Please direct questions/requests for help to the FastLED Reddit community: http://fastled.io/r We'd like to use github "issues" just for tracking library bugs / enhancements.
Go to file
2016-08-30 00:37:30 -07:00
docs Merge branch 'master' into rgbw 2016-01-23 14:15:34 -05:00
examples Fix RGBCalibrate example 2016-03-09 22:06:52 -08:00
extras FastLED6502 for Apple ][, Apple ][+. Apple //e, and Apple //gs. Initial commit; committer should probably be committed. Build with 'xa65' assembler. 2015-02-16 13:07:21 -05:00
lib8tion gcc register allocation appears to have changed a bit - make sure we get the right registers for andi. Fixes #302 2016-05-05 00:25:04 -07:00
platforms attempt a fix for #339 - guard waitfully against a race condition - and also make sure we reset the TCF flag whenever we write something out 2016-08-30 00:37:30 -07:00
.gitignore gitignore precompiled 2016-07-22 20:21:33 +02:00
bitswap.cpp Tweak 4-way parallel output to work on pins 12-15 on esp8266 - keep blocked out for now, needs some more testing. 2016-05-22 05:38:55 -07:00
bitswap.h Tweak 4-way parallel output to work on pins 12-15 on esp8266 - keep blocked out for now, needs some more testing. 2016-05-22 05:39:05 -07:00
chipsets.h Keep the reset timings for the 2813 the same as the rest for now. 2016-07-22 11:59:25 -07:00
color.h Arduion 1.6.6 and later, when you Include a library from the Sketch menu, will include _every_ header file - instead of just the library's main header file. Guard against that particular [REDACTED]. 2015-12-26 12:28:33 -06:00
colorpalettes.cpp Added DECLARE_GRADIENT_PALETTE, and Rainbow_gp definition just for completeness. 2015-08-09 14:02:56 -04:00
colorpalettes.h Arduion 1.6.6 and later, when you Include a library from the Sketch menu, will include _every_ header file - instead of just the library's main header file. Guard against that particular [REDACTED]. 2015-12-26 12:28:33 -06:00
colorutils.cpp In ColorFromPalette(s), skip redundant (and overflowing) increment of values after scale8 if scale8 is 'fixed' 2016-02-16 23:13:34 -05:00
colorutils.h Another 15-20% speedup in ColorFromPalette. Added support for 32-entry palettes, which interestingly can be slightly faster than 16-entry palettes, because 'index' lands exactly on a color entry (no blending needed) twice as often, about 1/8th of the time vs 1/16th. The speedups apply to 16-entry and 32-entry palette code. 2015-12-27 14:15:13 -05:00
controller.h Tweak dithering value setup in a world where scale8 is fixed 2016-02-16 20:03:19 -08:00
cpp_compat.h Arduion 1.6.6 and later, when you Include a library from the Sketch menu, will include _every_ header file - instead of just the library's main header file. Guard against that particular [REDACTED]. 2015-12-26 12:28:33 -06:00
dmx.h Merge branch 'master' into rgbw 2016-01-23 14:15:34 -05:00
fastled_config.h Fix #309 and wrap up #306 2016-06-07 23:08:07 -05:00
fastled_delay.h Add a variant of delaycycles that will always delay at least one cycle. 2016-01-18 17:00:49 -05:00
fastled_progmem.h Limit the range of the PROGMEM bug workaround to gcc versions older than 4.6. 2016-06-21 12:50:30 -07:00
FastLED.cpp Enable 4-way parallel output on the ESP8266. 2016-06-08 12:48:16 -05:00
FastLED.h I really should stop taking pull requests from folks. 2016-08-06 12:20:58 -07:00
fastpin.h Arduion 1.6.6 and later, when you Include a library from the Sketch menu, will include _every_ header file - instead of just the library's main header file. Guard against that particular [REDACTED]. 2015-12-26 12:28:33 -06:00
fastspi_bitbang.h Better adjusted delays for bitbang'd spi output. 2016-01-23 02:40:08 -05:00
fastspi_dma.h Adding empty dma file 2013-04-09 21:09:17 +00:00
fastspi_nop.h Arduion 1.6.6 and later, when you Include a library from the Sketch menu, will include _every_ header file - instead of just the library's main header file. Guard against that particular [REDACTED]. 2015-12-26 12:28:33 -06:00
fastspi_ref.h Arduion 1.6.6 and later, when you Include a library from the Sketch menu, will include _every_ header file - instead of just the library's main header file. Guard against that particular [REDACTED]. 2015-12-26 12:28:33 -06:00
fastspi_types.h Arduion 1.6.6 and later, when you Include a library from the Sketch menu, will include _every_ header file - instead of just the library's main header file. Guard against that particular [REDACTED]. 2015-12-26 12:28:33 -06:00
fastspi.h Hey, rfduino was never printing out #warning messages, so when i changed to #pragma message, discovered a place where we were putting out a message/warning where we shouldn't have 2016-05-22 14:43:56 -07:00
hsv2rgb.cpp Change a bunch of 171s to 170s to prevent overflow with the 'fixed' scale8. Don't ask my why these are preprocessor constants. (No reason.) 2016-02-17 00:01:00 -05:00
hsv2rgb.h Arduion 1.6.6 and later, when you Include a library from the Sketch menu, will include _every_ header file - instead of just the library's main header file. Guard against that particular [REDACTED]. 2015-12-26 12:28:33 -06:00
keywords.txt Add WS2813 2016-07-18 17:46:46 +02:00
led_sysdefs.h Added Simblee to led_sysdefs.h (same as NRF51 and RFduino). 2016-02-25 09:23:09 -06:00
lib8tion.cpp fixing build errors 2015-03-10 20:54:53 -07:00
lib8tion.h Force many very small functions to be inlined (LIB8STATIC_ALWAYS_INLINE) 2016-02-20 16:21:03 -05:00
library.json Fix JSON file for @PlatformIO 2015-10-07 11:56:39 +01:00
library.properties Bump library versions to 3.1.1 to get an arduino bug workaround in place. 2015-12-26 12:29:34 -06:00
LICENSE Initial commit 2013-11-09 17:41:14 -08:00
noise.cpp 12% speedup in noise on AVR (net with previous commit) by using inline avg15 on AVRs with MUL. Code size goes up 8 bytes for 16-bit, 3-D noise. 2016-01-07 15:25:10 -05:00
noise.h Arduion 1.6.6 and later, when you Include a library from the Sketch menu, will include _every_ header file - instead of just the library's main header file. Guard against that particular [REDACTED]. 2015-12-26 12:28:33 -06:00
pixelset.h Yank out some debug code that shouldn't have gotten checked in in the first place. 2016-01-18 16:52:51 -05:00
pixeltypes.h Added const qualifier to lerp8 and lerp16 signatures as per #332 2016-08-04 00:30:29 +01:00
platforms.h Add pin definitions and platform bits for the wino - Fix #250 2016-01-26 11:46:01 -05:00
PORTING.md complete renaming of k26 to kl26 2015-06-29 11:50:52 -07:00
power_mgt.cpp Add calculate_max_brightness_for_power_mW/vmA functions to do power calculations on individual strips 2016-05-04 15:54:37 -07:00
power_mgt.h doc udpate 2016-05-05 00:18:00 -07:00
preview_changes.txt Merge branch 'FastLED3.1' into d21 2015-08-08 18:23:34 -07:00
README.md Add ws2813 2016-07-19 10:11:38 +02:00
release_notes.md Fix #256 - enable 4-way parallel output on the ESP8266 using pins 12,13,14,15 (6,7,5 and 8 on the NodeMCU pin layout/mapping). 2016-06-08 12:50:32 -05:00
wiring.cpp SparkCore needs FastLED to be in a namespace. 2015-02-09 03:07:19 -05:00

Gitter

IMPORTANT NOTE: For AVR based systems, avr-gcc 4.8.x is supported and tested. This means Arduino 1.6.5 and later.

FastLED 3.1

This is a library for easily & efficiently controlling a wide variety of LED chipsets, like the ones sold by adafruit (Neopixel, DotStar, LPD8806), Sparkfun (WS2801), and aliexpress. In addition to writing to the leds, this library also includes a number of functions for high-performing 8bit math for manipulating your RGB values, as well as low level classes for abstracting out access to pins and SPI hardware, while still keeping things as fast as possible. Tested with Arduino up to 1.6.5 from arduino.cc.

Quick note for people installing from GitHub repo zips, rename the folder FastLED before copying it to your Arduino/libraries folder. Github likes putting -branchname into the name of the folder, which unfortunately, makes Arduino cranky!

We have multiple goals with this library:

  • Quick start for new developers - hook up your leds and go, no need to think about specifics of the led chipsets being used
  • Zero pain switching LED chipsets - you get some new leds that the library supports, just change the definition of LEDs you're using, et. voila! Your code is running with the new leds.
  • High performance - with features like zero cost global brightness scaling, high performance 8-bit math for RGB manipulation, and some of the fastest bit-bang'd SPI support around, FastLED wants to keep as many CPU cycles available for your led patterns as possible

Getting help

If you need help with using the library, please consider going to the google+ community first, which is at http://fastled.io/+ - there are hundreds of people in that group and many times you will get a quicker answer to your question there, as you will be likely to run into other people who have had the same issue. If you run into bugs with the library (compilation failures, the library doing the wrong thing), or if you'd like to request that we support a particular platform or LED chipset, then please open an issue at http://fastled.io/issues and we will try to figure out what is going wrong.

Simple example

How quickly can you get up and running with the library? Here's a simple blink program:

#include "FastLED.h"
#define NUM_LEDS 60
CRGB leds[NUM_LEDS];
void setup() { FastLED.addLeds<NEOPIXEL, 6>(leds, NUM_LEDS); }
void loop() {
	leds[0] = CRGB::White; FastLED.show(); delay(30);
	leds[0] = CRGB::Black; FastLED.show(); delay(30);
}

Supported LED chipsets

Here's a list of all the LED chipsets are supported. More details on the led chipsets are included TODO: Link to wiki page

  • Adafruit's DotStars - AKA the APA102
  • Adafruit's Neopixel - aka the WS2812B (also WS2811/WS2812/WS2813, also supported in lo-speed mode) - a 3 wire addressable led chipset
  • TM1809/4 - 3 wire chipset, cheaply available on aliexpress.com
  • TM1803 - 3 wire chipset, sold by radio shack
  • UCS1903 - another 3 wire led chipset, cheap
  • GW6205 - another 3 wire led chipset
  • LPD8806 - SPI based chpiset, very high speed
  • WS2801 - SPI based chipset, cheap and widely available
  • SM16716 - SPI based chipset
  • APA102 - SPI based chipset
  • P9813 - aka Cool Neon's Total Control Lighting
  • DMX - send rgb data out over DMX using arduino DMX libraries
  • SmartMatrix panels - needs the SmartMatrix library - https://github.com/pixelmatix/SmartMatrix

LPD6803, HL1606, and "595"-style shift registers are no longer supported by the library. The older Version 1 of the library ("FastSPI_LED") has support for these, but is missing many of the advanced features of current versions and is no longer being maintained.

Supported platforms

Right now the library is supported on a variety of arduino compatable platforms. If it's ARM or AVR and uses the arduino software (or a modified version of it to build) then it is likely supported. Note that we have a long list of upcoming platforms to support, so if you don't see what you're looking for here, ask, it may be on the roadmap (or may already be supported). N.B. at the moment we are only supporting the stock compilers that ship with the arduino software. Support for upgraded compilers, as well as using AVR studio and skipping the arduino entirely, should be coming in a near future release.

  • Arduino & compatibles - straight up arduino devices, uno, duo, leonardo, mega, nano, etc...
  • Arduino Yún
  • Adafruit Trinket & Gemma - Trinket Pro may be supported, but haven't tested to confirm yet
  • Teensy 2, Teensy++ 2, Teensy 3.0, Teensy 3.1/3.2, Teensy LC - arduino compataible from pjrc.com with some extra goodies (note the teensy 3, 3.1, and LC are ARM, not AVR!)
  • Arduino Due and the digistump DigiX
  • RFDuino
  • SparkCore
  • Arduino Zero
  • ESP8266 using the arduino board definitions from http://arduino.esp8266.com/stable/package_esp8266com_index.json - please be sure to also read https://github.com/FastLED/FastLED/wiki/ESP8266-notes for information specific to the 8266.
  • The wino board - http://wino-board.com

What types of platforms are we thinking about supporting in the future? Here's a short list: ChipKit32, Maple, Beagleboard

What about that name?

Wait, what happend to FastSPI_LED and FastSPI_LED2? The library was initially named FastSPI_LED because it was focused on very fast and efficient SPI access. However, since then, the library has expanded to support a number of LED chipsets that don't use SPI, as well as a number of math and utility functions for LED processing across the board. We decided that the name FastLED more accurately represents the totality of what the library provides, everything fast, for LEDs.

For more information

Check out the official site http://fastled.io for links to documentation, issues, and news

TODO - get candy