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
0
votes
1 answer

issue with Arduino using FastLed with IRremote change mode

Hi I am trying to build a arduino project to control led strip and change the light pattern when pressed different button the code i am using is #include //include the library #include // How many leds in your…
user4965201
  • 973
  • 1
  • 11
  • 25
0
votes
0 answers

WS2812 LED light strips behaving strange

I had a long strip of WS2812 lights (300 LEDs) and had some code that was working completely fine. I decided to cut the strip so it would be the length of my desk but now the lights are acting strange and not following my code at all. I modified the…
user13119765
0
votes
1 answer

Fade leds with serial communication Arduino

I am getting serial communication and trying to make an led fade effect , This is my function for leds which is facing latency issues , obviously the for loop . Can anyone suggest a better logic or solution to approach this without getting latency…
Roy Sukrit
  • 51
  • 1
  • 6
0
votes
1 answer

Fastled not enough CPU power?

I was wondering if someone could help me out? I have a 5M ledstrip (300 leds) and running the following code on my ESP32. The code will make a led light spinning around! void spinningwheel(){ int random_number; int spin_speed; for(int i =0; i < 1;…
0
votes
0 answers

FastLed Matrix with nonlinear led array

I built this LED lamp project where i put 126 ping pong balls with ws2812B leds inside, into a glass vase. I had no previous knowledge of fastled prior to this. The balls are all jumbled up and leds are in no apparent sequence any longer. In the…
Bravewart
  • 17
  • 7
0
votes
0 answers

Arduino FastLED: Trying to group LEDs into pairs of two

I have a strip of leds cut into pairs; each pair is in its own lantern, and I want the lanterns to alternate whatever I put through them. I am using FastLED library. I have posted what I have come up with. It seems to work in the console; the arrays…
0
votes
1 answer

FastLed library use the CRGB as attribute

I'm working on a program for an addressable LED strip. It is working and at this point I'm trying to make my code better. I have 3 LED strips and I made a function which all three has to do. In the function I want to specify which one needs to be…
Heis
  • 606
  • 5
  • 25
0
votes
1 answer

First led of WS2812B starts to light when the code enters the for loop

I'am working on this project, it should be a light for a carport. There are two ways to turn the light on, via motion sensor or via a switch. The Led strip starts to turn on one led after another. It will stay on for a period of time and then a…
marvinm
  • 11
  • 3
0
votes
3 answers

FastLED breathing effect with max brightness

I have a problem. I am controlling my WS2812B using an Arduino, but I have a problem with the breathing effect. I created a class in the code that looks like this: String breathDirection = "Down"; void breath_effect() { fill_solid(leds, TOTAL_LEDS,…
A. Vreeswijk
  • 822
  • 1
  • 19
  • 57
0
votes
0 answers

Problem using PROGMEM with pointer to an int array

my arduino nano drives an LED Matrix. evrything works fine. but my "outline path" ist too big for the SRAM, so i try to put it into PROGMEM. Now reading values from this progmem array leads to totally wrong integers. what am i doing wrong? thx for…
just4phil
  • 25
  • 1
  • 5
0
votes
0 answers

FastLED on Arduino with int[] Array

I built a LED Matrix with ws2812b LEDs. It is driven by an arduino nano. I use the CLED lib in combination with FastLED. It works fine! Now I have a very simple routine here that wont work although there is no error or warning. The problem seems to…
just4phil
  • 25
  • 1
  • 5
0
votes
2 answers

error: use of 'this' in a constant expression in Arduino Class

i am trying to write a class for an arduino projekt, i am using the information in http://paulmurraycbr.github.io/ArduinoTheOOWay.html as a guide. I want to set up a lighstrip for further use and constantly keep getting the errormessage: error: use…
xBarns
  • 291
  • 1
  • 3
  • 12
0
votes
2 answers

FastLED blinking - chaning color using millis() without delay

I am trying to blink my led strip without using a delay() So far i have somethin like this: #include #define NUM_LEDS 60 #define BRIGHTNESS 32 #define LED_TYPE WS2811 #define DATA_PIN 6 CRGB leds[NUM_LEDS]; unsigned long actTime =…
b0bgetout
  • 25
  • 2
  • 7
0
votes
0 answers

Replace octoWS2811 with fastled 2812 for streaming purposes

hello fellow arduino programmers, im currently working on a LED matrix where im driving a 30x7 (210led WS2812) matrix. im usng a arduino nano for this job. i found this part of code on the internet, but this is using the octoWS2811 library, and i…
Igor D
  • 108
  • 2
  • 12
0
votes
0 answers

Arduino Maps or Lists for LED board animations

im working with an arduino attached with 6 LED programmable strips and the FASTLED library. for animations i need to efficiently pass data to methods to create easy animations. the leds are in a grid of 6 X 30, and the only way to light them is to…
Igor D
  • 108
  • 2
  • 12