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
2015-02-16 13:07:21 -05:00
docs Adding more docs 2014-12-01 21:23:45 -08:00
examples Adding DemoReel100 example 2015-01-07 19:56:56 -05: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
platforms Update USART SPI definitions for Teensy2/Teensy++2 2015-01-30 12:44:53 -08:00
.gitignore .gitignore html/ folder (contains gh-pages branch) 2014-11-29 22:04:23 -08:00
bitswap.h Don't need bitswap functions on non-arm yet 2014-10-30 13:54:05 -07:00
chipsets.h Fix issue #120 - add timings for the UCS1904. 2015-01-15 10:47:53 -08:00
color.h Changing names to TypicalFoo 2014-04-17 15:41:58 -04:00
colorpalettes.cpp Shut off version warning in color palettes 2014-11-24 12:10:58 -08:00
colorpalettes.h Added CHSVPalette16, CHSVPalette256, and map_data_into_colors_through_palette( data, NUM_LEDS, leds, palette), which saves typing, and lets you focus on 'data' and 'palette' separately. 2014-10-11 08:21:14 -04:00
colorutils.cpp Add a short circuit to nblend 2015-01-02 23:40:33 -08:00
colorutils.h Added nblendPaletteTowardPalette as a toplevel function for palette crossfade support... I suspect there will be some small changes coming to this, but here it is. 2014-12-12 20:59:26 -05:00
controller.h checkpoint 2014-07-07 11:19:42 -07:00
delay.h Removing references to millisecond counter adjustments since they aren't needed anymore. 2014-11-04 10:38:45 -08:00
dmx.h Bring DMX kicking and screaming into the FastLED2.1 world 2014-10-09 22:02:09 -07:00
fastled_config.h Prefix config defines with FASTLED_ to make sure we don't conflict with anything else. 2014-11-24 12:13:09 -08:00
FastLED.cpp We only need to see the FastLED version warning once, thank you very much 2014-11-21 23:44:11 -08:00
FastLED.h Fix issue #120 - add timings for the UCS1904. 2015-01-15 10:47:53 -08:00
fastpin.h Re-arranging code layout, pulling off platform specific headers into their own directories. 2014-11-17 23:53:57 -08:00
fastspi_bitbang.h Fix software SPI on the teensy 3.1 for APA102. 2015-01-30 10:12:06 -08:00
fastspi_dma.h Adding empty dma file 2013-04-09 21:09:17 +00:00
FastSPI_LED2.h Adding stub file to redirect includes to the new name for the library, also a warning to tell people to include the correct thing 2013-11-10 15:25:44 -08:00
fastspi_nop.h Some more tweaking/spreading out of the SPI code 2014-01-27 11:04:56 -08:00
fastspi_ref.h Reference/beginning of hardware SPI support for the due, some other code cleanup 2014-03-09 18:09:07 -07:00
fastspi_types.h Re-arranging code layout, pulling off platform specific headers into their own directories. 2014-11-17 23:53:57 -08:00
fastspi.h Fixed UART SPI on AVR chipsets. 2015-01-30 12:14:40 -08:00
hsv2rgb.cpp Adding rgb2hsv_approximate. It's (1) just an approximation, (2) not nearly as fast as the normal HSV-to-RGB conversion, and (3) it's most accurate when it's converting back to HSV from RGB colors that came from fully-saturated HSV colors to start with, e.g., CHSV( hue, 255,255)-> CRGB-> CHSV will give best results. 2015-01-03 15:52:38 -05:00
hsv2rgb.h typo fix 2015-01-03 16:55:19 -05:00
keywords.txt Fixing sin8 and sin16 keywords 2014-10-24 06:46:36 -04:00
led_sysdefs.h Add configuration option for allowing/disallowing interrupts. Disable by default for AVR, block out AVR implementation of wiring functions. 2014-11-24 12:11:38 -08:00
lib8tion.cpp Added EVERY_N_SECONDS and several variations. Some of it is preprocessor macros instead of templates because of C++03 template rules (which have subsequently been relaxed in C++11). 2014-12-09 01:35:32 -05:00
lib8tion.h Silence a warning in scale16by8 in AVR asm. 2015-01-15 00:55:19 -05:00
LICENSE Initial commit 2013-11-09 17:41:14 -08:00
noise.cpp #105 2014-12-14 11:30:29 -08:00
noise.h noise tweak 2014-10-24 12:34:59 -04:00
pixeltypes.h Added CRGB::getParity, CRGB::setParity, and fairy light color apporximations: CRGB::FairyLight and CRGB::FairyLightNCC (for use with No Color Correction). 2014-12-08 23:59:14 -05:00
platforms.h Add configuration option for allowing/disallowing interrupts. Disable by default for AVR, block out AVR implementation of wiring functions. 2014-11-24 12:11:38 -08:00
power_mgt.cpp We only need to see the FastLED version warning once, thank you very much 2014-11-21 23:44:11 -08:00
power_mgt.h Adding power management code, with global interfaces ONLY at this point. 2014-08-05 14:16:00 -04:00
preview_changes.txt Fixed UART SPI on AVR chipsets. 2015-01-30 12:14:40 -08:00
README.md Updating readme about avr-gcc 4.7 and linux. 2015-02-03 12:21:46 -08:00
release_notes.md Prefix config defines with FASTLED_ to make sure we don't conflict with anything else. 2014-11-24 12:13:09 -08:00
wiring.cpp Add configuration option for allowing/disallowing interrupts. Disable by default for AVR, block out AVR implementation of wiring functions. 2014-11-24 12:11:38 -08:00

IMPORTANT NOTE: For AVR based systems, avr-gcc 4.8.x is supported, as is avr-gcc 4.3 and earlier. There are known issues with avr-gcc 4.7 and timing based chipsets like the WS2812B. If you are using a linux system make sure you are using avr-gcc 4.8.x not avr-gcc 4.7.x.

FastLED 3.0

IMPORTANT NOTE: If you are building for AVR based systems, please do not use any version of the arduino IDE 1.5.7 or later yet. It messes with some of the asm output which will cause you problems.

This is a library for easily & efficiently controlling a wide variety of LED chipsets, like the ones sold by adafruit (Neopixel, 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.

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 Neopixel - aka the WS2812B (also WS2811/WS2812, also suppored 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...
  • Adafruit Trinket & Gemma - Trinket Pro may be supported, but haven't tested to confirm yet
  • Teensy 2, Teensy++ 2, Teensy 3.1 - arduino compataible from pjrc.com with some extra goodies (note the teensy 3 is ARM, not AVR!)
  • Arduino Due and the digistump DigiX

What types of platforms are we thinking about supporting in the future? Here's a short list: RFDuino, SparkCore, MSP430, 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