Questions tagged [fastled]

The FastLED library is a popular library for easily and efficiently controlling a wide variety of pixel-addressable RGB LED chipsets, like the WS2812, APA102, and others. Use this tag for questions specifically about FastLED usage and development.

FastLED is a library for easily and efficiently controlling a wide variety of RGB, pixel-addressable LED chipsets, like the ones sold by AdaFruit under the brand names Neopixel and DotStar. These chips let you send an RGB color to a chip which contains red, blue, and green LEDs and they maintain that color. Popular LED chips include the WS2812b and family, the APA102c, and a bunch of related chips. Typically you control them by hooking them up to an Arduino or similar controller, programmed in C++, and send strings of bits through an output pin to the chips to specify the colors you want.

FastLED makes it easy to define an array of RGB colors, update it, and send it to your LEDs quickly.

In addition to writing to the LEDs, this library also includes a number of functions for high-performing 8-bit 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.

Advantages of FastLED:

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.

69 questions
-1
votes
1 answer

Why isn't FastLED accepting the string as a string?

I am trying to pass two values into my Arduino script from a Bluetooth serial connection. The first part of the string received is the LED number, the second is the LED color in the form of a hex code (0x000000). The first variable is converted and…
-1
votes
1 answer

Arduino error while using ArduinoJson - call of overloaded 'println(....) is ambiguous'

I was working with the FastLED library and I had to transfer data from a python program to Arduino. The only way I could find was to create JSON data and decode it on Arduino using ArduinoJSON. But I ran into several errors while trying to use that…
Shubh Patni
  • 468
  • 1
  • 4
  • 7
-1
votes
1 answer

switching between functions using an IR remote

I have bought a WS2812B Led Strip. I'm trying to controll it with a IR remote. it is all controlled by a arduino uno. I know the leds work and i know the remote works. I'm trying to pre-program a few animations on the remote. The code below is as…
applesomthing
  • 361
  • 3
  • 19
-1
votes
3 answers

How can I call a function where the argument is produced by another function?

I'm controlling a strip of LEDs using an Arduino and the FastLED library and I've set up a few functions that allow me to change the colour of LEDs and the like. I have a function where the values for red, green and blue are passed in, and it sets…
Thomas
  • 21
  • 4
-1
votes
2 answers

How to use Serial as an interrupt for other functions

I'm making an LED control program (using FastLED, of course) and using Serial (with the Serial monitor) to control it. I just connected it via USB and for the most part it works just fine. However, I noticed with the long, flashing routines that I…
Sam T.
  • 1
  • 3
-2
votes
1 answer

animate LED in void setup();

I am trying to make a program to control matrix LED using fastLED library. I have 4 buttons where each button activate the corresponding animation. But I want the program to be able to start animating one of the animation functions I made once the…
-2
votes
1 answer

blinking WS2812 fastLED with milis arduino

I'm trying to get my led to blink every 2 seconds using millis. Delay is not a possibility as I have other sensors running. So far I got this, but it does not seem to work #include "FastLED.h" #define NUM_LEDS 12 // number of LEDS in neopixel…
-2
votes
1 answer

Display an Array of HEX values on an LED Matrix with Arduino

So I wrote a script in Processing that can output the HEX values of every pixel of any given image into an array. Im trying to get this FastLED library to read the Array and Im getting so many different errors. I tried changing the HEX's to strings…
-3
votes
1 answer

FastLED, how can i change the Number of LEDs (NUM_LEDS) at runtime?

is it possible to change the number of leds at runtime (Arduino/FastLED) ? How can i do that? A small sample code would be nice because i am a newbie :) Thank you!
PascalL
  • 155
  • 3
  • 12
1 2 3 4
5