Git Product home page Git Product logo

fastled / fastled Goto Github PK

View Code? Open in Web Editor NEW
6.3K 6.3K 1.6K 15.48 MB

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.

Home Page: http://fastled.io

License: MIT License

C++ 84.93% C 14.62% Makefile 0.01% Shell 0.01% Python 0.39% CMake 0.04%

fastled's People

Contributors

5chmidti avatar ben-xo avatar craiglink avatar dmadison avatar fifthclassdesigns avatar focalintent avatar henrygab avatar ivankravets avatar jonnyhaystack avatar jueff avatar kcouck avatar kriegsman avatar ladyada avatar maddogjt avatar marcmerlin avatar marmilicious avatar martymacgyver avatar ngyl88 avatar nicohood avatar nielsnl68 avatar paulstoffregen avatar paulzc avatar samguyer avatar sascha432 avatar sethtroisi avatar shlomozippel avatar somewhatlurker avatar ssilverman avatar vovagorodok avatar zackees avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fastled's Issues

How to controll 2 and more led 'blocks'?

Hello, I have 2 led blocks (10 leds in one, so, 20 leds I have), but I don't know how to controll it...

Led's controller: WS2811
Arduino Uno.

For example, there is "FastLED.showColor(...)" function, but it's change colors all of leds.
Also, there is "leds[led_id]", but it's unexceptable becouse of cycles.

Question. Is there methods like "FastLED_1.showColor(); FastLED_2.showColor()"?

LEDS EXAMPLE: http://oi57.tinypic.com/our5e0.jpg

Complete DUE support

Finish up support for the due, including:

  • proper hardware SPI support
  • completed clockless testing on single line

Support UCS1903B

I'm try to add new chipset in source code for support UCS1903B this datasheet:
http://www.icdemi.com/manual/UCS1903B.pdf
(sorry, but i find only the chinese version).

chipsets.h:

...
template <uint8_t DATA_PIN, EOrder RGB_ORDER = RGB>
class UCS1903BController800Khz : public ClocklessController_Trinket<DATA_PIN, 2, 5, 3, RGB_ORDER> {};

...

template <uint8_t DATA_PIN, EOrder RGB_ORDER = RGB>
class UCS1903BController800Khz : public ClocklessController_Trinket<DATA_PIN, 4, 10, 6, RGB_ORDER> {};

...

// UCS1903B - 400ns, 450ns, 450ns
template <uint8_t DATA_PIN, EOrder RGB_ORDER = RGB>
class UCS1903BController800Khz : public ClocklessController<DATA_PIN, NS(400), NS(450), NS(450), RGB_ORDER> {};

if NO_TIME(400, 450, 450)

warning "Not enough clock cycles available for the UCS1903B"

endif

FastLED.h also was edited for adding support of UCS1903B.

Timings in datasheet:
T0H 0.4μs ± 40 ns
T1H 0.8μs ± 80 ns
T0L 0.85μs
T1L 0.45μs
Reset >=24us

but it wan't work... Also i'm not sure about tick counters in a part that use ClocklessController_Trinket. Can you help me?

Example: testleds needs updating (find included update)

I'm not very familiar with github, but I noticed that the example "testleds" was still relying on FastSPI_LED, so I updated the code ... I know this is not the way to do it, I just don't know the right way to contribute ... hopefully it's helpful ...

--- example code "testleds" ---

#include "FastLED.h"

#define NUM_LEDS 60

// Define the array of leds
CRGB leds[NUM_LEDS];

#define PIN 6

void setup()
{
  FastLED.addLeds<NEOPIXEL, PIN, RGB>(leds, NUM_LEDS);
}

void loop() { 
  // one at a time
  for(int j = 0; j < 3; j++) { 
    for(int i = 0 ; i < NUM_LEDS; i++ ) {
      memset(leds, 0, NUM_LEDS * 3);
      switch(j) { 
        case 0: leds[i].r = 255; break;
        case 1: leds[i].g = 255; break;
        case 2: leds[i].b = 255; break;
      }
      FastLED.show();
      delay(10);
    }
  }

  // growing/receeding bars
  for(int j = 0; j < 3; j++) { 
    memset(leds, 0, NUM_LEDS * 3);
    for(int i = 0 ; i < NUM_LEDS; i++ ) {
      switch(j) { 
        case 0: leds[i].r = 255; break;
        case 1: leds[i].g = 255; break;
        case 2: leds[i].b = 255; break;
      }
      FastLED.show();
      delay(10);
    }
    for(int i = NUM_LEDS-1 ; i >= 0; i-- ) {
      switch(j) { 
        case 0: leds[i].r = 0; break;
        case 1: leds[i].g = 0; break;
        case 2: leds[i].b = 0; break;
      }
      FastSPI_LED.show();
      delay(1);
    }
  }

  // Fade in/fade out
  for(int j = 0; j < 3; j++ ) { 
    memset(leds, 0, NUM_LEDS * 3);
    for(int k = 0; k < 256; k++) { 
      for(int i = 0; i < NUM_LEDS; i++ ) {
        switch(j) { 
          case 0: leds[i].r = k; break;
          case 1: leds[i].g = k; break;
          case 2: leds[i].b = k; break;
        }
      }
      FastLED.show();
      delay(3);
    }
    for(int k = 255; k >= 0; k--) { 
      for(int i = 0; i < NUM_LEDS; i++ ) {
        switch(j) { 
          case 0: leds[i].r = k; break;
          case 1: leds[i].g = k; break;
          case 2: leds[i].b = k; break;
        }
      }
      FastLED.show();
      delay(3);
    }
  }
}

latest release will not install in ardduino w/o manual edits

FastLED-master.zip (no your site on 2/20/2014) cannot be installed in the arduino as a library because it has a dash in its name. the zipped file with the same name also cannot be installed even if the zipped file is renamed because of a dash in its name.

Flicker issue wtih neopixel connected to a UDOO

I have 80 neopixel connected to an arduino DUE. There is a strange flicker after 60 leds. I checked and made sure the grounds are connected well and the data pin is not loose. The fist 60 are working well. There is a flicker for the rest.

I am using the 2.1 branch which was recommended for the DUE. Could anyone tell me how can I fix this ?

Add basic XY matrix support

Add support for basic XY operations, including both plain "row order" matricies, and "row prime order" aka serpentine aka boustrophedon layouts.

support TLS3001

https://code.google.com/p/fastspi/issues/detail?id=35 - support for the TLS3001 chipset - some random notes from the original ticket

Data communication protocol

Gave SDI input signal pin must follow the following definitions:

a. valid input data must be Manchester encoded signal from high to low transition indicates "1", from low to high

Jump indicates "0"

b. During chip power after a synchronization frame must be sent to the chip detection of communication baud rate. Sync frame

Format is: 15'b111111111111111 +4' b0001 +11' b00000000000, sending synchronization

Frame must be delayed for some time and then send the data frame, so that each chip can be done in order to accurately detect

To the communication baud rate, delay time (us) greater than: Connection chip count ÷ communication baud rate (MHz) × 30

c. several frames in the transmission data, re-send a reset frame, wait 1ms later, send it again with the

Step frames for the chip to eliminate the accumulated error, reset frame format:

15'b111111111111111 +4' b0100

d. data frame format is: 15'b111111111111111 +4' b0010 (header) + first chip

39bit second chip 39bit data + data + ...... + n-th chip 39bit data

e. first chip is first received data chips, chip data format is: 1 'b0 (identification bits) + 12'

bxxxxxxxxxxxx (output port 1 data) + 1'b0 (flag) + 12'bxxxxxxxxxxxx (input

The port 2 data) + 1'b0 (flag) + 12'bxxxxxxxxxxxx (output port 3 data),

x is 1 or the 0

f. data is first sent MSB (most significant bit)

g. SDI input pin in the idle state, must remain low

h. the same frame data transmission process, must be sent contiguously, in the middle, without interruption, transmission frequency can not be Changed.

Jun 27, 2013 Delete comment Project Member #3 danielgarcia
So I can make sure to clean it out - where do you see it referenced? I have no file named changes.txt in my distributions, there's preview_changes.txt which was a log of preview release changes for FastSPI_LED2 - but there's no mention of the tls3001 in there.

The only reference to the tls3001 that I have in my arduino folders is a reference file for information for when I got to implementing the tls3001 support, but it's hardly a release note, it does look like it slipped out with a build of the original version of the library.

Unfortunately the tls3001 encoding is completely different from anything used by any of the existing chipsets, and I don't have a line on a good fast implementation of it yet. On top of that, the tls3001 is a 12-bit per color chipset, which is something that we won't have support for in the library across the board until later this summer (there are a handful of chipsets coming down the line that are 12-bit instead of 8-bit).

The odd bit-sizes will make working with any kind of hardware support a bit of a pain, though that will be a little bit easier with the teensy 3 and arduino due, as they allow 'odd' bit sizes for writing out.

I am very very behind on a large led installation that i'm working on for the fourth of july, so I'm mostly putting off doing any non-bugfix related work for the library until after then.

The basic protocol is a fairly simple mapping. When you want to write a 1 bit, you set the data high then to low. When you want to write a 0 bit, you set the data low, then high. So, for example, simplistically:

Write 1 bit: FastPin<12>::hi(); FastPin<12>::lo();
Write 0 bit: FastPin<12>::lo(); FastPin<12>::hi();

Or to write a whole byte b

for(int i = 0; i < 8; i++) {
if(b & 0x80) { FastPin<12>::hi(); FastPin<12>::lo(); }
else { FastPin<12>::lo(); FastPin<12>::hi(); }
b <<= 1;
}

The concern that I have with the TLS3001 is this line "transmission frequency can not be Changed" - I'm curious what the tolerances are on that - because the amount of work that would be required to translate data to something that could be written out would mean that the timing between bits could slide around a bit.

Anyway - let me know what file is referencing the tls3001 and i'll make sure to clean it up so as to not throw people off in the future, and I have a set of TLS3001 upstairs so I can tackle an efficient implementation later this summer.

The very dimmest possible LED value is displayed as black

The first LED in the chain is displayed as black when it should be very dim. This occurs with both the WS2801 and the WS2811.

#include "FastLED.h"
#define NUM_LEDS 6
#define DATA_PIN 13
CRGB leds[NUM_LEDS];

void setup() {
   delay(2000);
   FastLED.addLeds<WS2801, RGB>(leds, NUM_LEDS);
   //FastLED.addLeds<WS2811, DATA_PIN, GRB>(leds, NUM_LEDS);
}

void loop() {
   leds[0] = 0x010101; 
   leds[1] = 0x020202;
   leds[2] = 0x030303;
   leds[3] = 0x040404;
   leds[4] = 0x050505;
   leds[5] = 0x060606;
   FastLED.show();
}

Compiling error on ATmega32u2

For me it seems to be impossible to get it run under my ATmega32u2 as I am not able to compile the FastLed.

The ATmega is connected to RPi UART
RPi TxD <-> ATmega PORTD Pin PD2

The LED Strip is connected to the ATmega
ATmega PORTB Pin PB0 <-> DI LED Strip

Any suggestions to get it work?

Best HW choice for 25+ meter long strip

Hello,

after browsing a lot for LED related programming topics I found that this may be the best place to get a proper answer. My question: I'm planning a 25-30 meter long RGB LED strip and was thinking about LPD8806 52 pixel/m rolls... but I'm worried about the update speed of such a long strip. Is there any experience values on strips with this length? I do not need 500 updates/s - but also more than a few updates/sec would be welcome :) What the best hardware for such a setup? Teensy 3.1 with FastSPI? Which LED? Is the 3-wire (WS2811 or WS2812) capable of supporting a higher update frequency than the SPI based LPD8806?

Thanks for help!
Michael

MeFirst example

Update/replace FirstLight.ino with a "MeFirst" example that includes enough for someone to get up and running and start playing with the leds.

LPD8806 low-bit handling

The LPD8806 is a 7-bit-per channel strip, but people program it in 8-bit values.

We need to somehow make the low bit 'visible' so channel values of "1" are not black.

FastLED + Ethershield

When I try to use both EtherShield and FastLED I have issues where the shield does not respond. When I add the line "FastLED.addLeds" I no longer receive Serial output and no response to Ethernet traffic. My guess is its SPI related.

include util.h>

include EthernetUdp.h>

include EthernetServer.h>

include EthernetClient.h>

include Ethernet.h>

include SPI.h>

include "FastLED.h"

byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
IPAddress ip(192, 168, 2, 181);
EthernetUDP Udp;

CRGB Leds[50];

void setup() {
Serial.begin(9600);
FastLED.addLeds WS2811, 3, RGB>(Leds, 2);
uint16_t PortNr = 5568;
Ethernet.begin(mac,ip);
Udp.begin(PortNr);
Serial.println("UDP Socket Setup");
}

millis() runs differently with dithering enabled/disabled?

Is it possible that millis() is running around 0.5% 'faster' with dithering disabled (or 0.5% slower with dithering enabled)? This seems very unlikely, yet potentially possible. The thing that made me notice it was when I shot videos of the same sketch running with and without dithering enabled, and composed the two videos side-by-side. The "with dithering" video slowly drifted out of sync with the "without dithering" video, dithering falling visibly behind the no-dither video.

I suspected my own sketch or something similar at first, but literally all that changed was the dithering toggle.

Furthermore -- and this is where millis() comes in -- the sketch has no statics, no internal timing loops. The content of each frame is generated by a function that takes millis() as input -- and nothing else.

So assuming that the videos were shot at the same frame rate, and that iMovie can correctly keep them playing at a constant rate for one minute, the only other thing that's changing is the rate at which 'millis()' ticks.

I then re-ran the same sketch for 10 minutes (stopwatch) with and without dithering, and I believe that what I got was basically that the no-dithering version reported that five minutes took roughly 600,000 millis, but that the with-dithering version reported that five minutes took something like 594,000 millis. Margin of error is probably 1,000ms.

There are no calls to delay() in this sketch. It basically just pounds out LED updates as fast as possible all the time (for best dithering effect).

Arduino Nano ATmega328
WS2811 x 64
Arduino IDE 1.0.5
FastLED 2.1 Dithering branch -- a couple of days old -- I'll update and retry, but I wanted to get the issue in the queue.

Please close as "won't fix" if the underlying issue is that I need more coffee to make time run at a better rate.

Support single-color multi-chip brightness variations

I have some (admittedly uncommon) LPD8806 strip with 3-die warm white LEDs on it. The library works well with this strip, but I would like to increase my available brightness resolution by dithering one high-resolution brightness value across the 3 dies (the 8806 only supports 7 bits per channel). My present approach for this this involves more math per pixel than makes sense.

It would be helpful if the library included support directly for something like this.

Allow building outside of arduino environments

For example, either with avr-g++ or avr-studio directly. This will require removing reliance on the arduino headers even existing (or, at the very least, careful checks around code for environments where the arudino headers don't exist).

Reversing every second line in LED matrix

Hi and thanks for the awesome library!

I'm a little hesitant to put this forward, as I might belong to a small minority, but I thought I'd at least mention it and see what you think.

I've bought of of these: https://www.kickstarter.com/projects/311408456/rgb-123-led-matrices

In my case a 16x16 matrix of 256 WS2812B LEDs. Works wonderfully with FastLED with one minor issue: every second row is reversed. This due to the LEDs being wired in a zigzag pattern in the matrix, where led15 is on the first row in the last column on the right, while led16 is one row below in the same column, and led17 one column to the left - you get the idea.

As I let the Arduino (and later the Spark Core whenever FastLED supports it) simply receive data over serial or WiFi from a PC (it "streams" live) I've moved the heavy lifting of reversing every second line to my Python code on the PC in stead of wasting precious cycles on the Arduino. However, I was thinking that I'm probably not the only one that might have LEDs wired in a zigzag pattern, so perhaps this is something for FastLED?

OJ - no relation

Document dithering & color temperature

Update documentation to track/explain what is happening with the dithering and the color temperature (including FastLED.show changes and FastLED.delay introduction).

Tweak "yellow" (and "aqua") HSV colors

Yellow and aqua have the potential for off-by-one-bit in some color channels due to use of (2 x 1/3rd) vs (2/3rds). At lowest brightnesses, this was making yellow fade down thusly: YELLOW! Yellow! yellow. red. (oops)

WS2812B not supported in v2.1?

Hi D Garcia,

I've been struggling to get my LEDs working properly in v2.1 and i'm getting wrong colors. i tried the pololu libraries, which give me correct RGB colors. Checked settings, all good, but still bad results, so started comparing code in the FastLed.h file between v2 & v2.1 and noticed this line not present in the v2.1 file:
case NEOPIXEL: { static WS2811Controller800Khz<DATA_PIN, GRB> controller; return addLeds(&controller, data, nLedsOrOffset, nLedsIfOffset); }

so i replaced v2.1 library with v2 and added the following addLeds line:
FastLED.addLeds<NEOPIXEL, DATA_PIN, RGB>(leds, NUM_LEDS);

in the RGBCalibrate library, et voila!
1 Red, 2 Green and 3 Blue LEDs appear! (Including a big smile on my face!) ;)

Another thing that happens when i use the WS2812B line in v2.1 is that blue is very very dimmed (but that's probably a side effect of the missing code in 2.1?)

I'm new to this LED stuff, so not sure if i did something wrong, or support is simply missing in v2.1, but thought you wanted to know this, since repo states support for Neopixel / WS2812(B).

Could this be fixed in v2.1?

TNX in advance!

Jeroen

not compatible with teensy 3.1

when trying to compile this library for teensy 3.1 these errors are displayed:

In file included from /Users/pankow/Documents/Arduino1/libraries/FastLED/fastspi.h:6:0,
from /Users/pankow/Documents/Arduino1/libraries/FastLED/FastLED.h:6,
from FASTLED2_5vSwitch.ino:3:
/Users/pankow/Documents/Arduino1/libraries/FastLED/delay.h: In function 'void _delaycycles_AVR() [with int LOOP = 15; int PAD = 2]':
/Users/pankow/Documents/Arduino1/libraries/FastLED/delay.h:35:4: error: unknown register name 'r16' in 'asm'

multi-strip led examples

Provide example code and documentation on how to use multiple strips from a single controller.

Compile Error in Attiny85 internal 16MHz

Hello,

i'm very happy to found this lib. But, i run in some compile errors with FastLED 2.1:

Blink.cpp.o: In function CLEDController* CFastLED::addLeds<(EClocklessChipsets)4, (unsigned char)3, (EOrder)10>(CRGB const*, int, int)': C:\Users\xpix\Dropbox\arduino-1.5.4\libraries\FastLED/FastLED.h:139: undefined reference to '__cxa_guard_acquire' C:\Users\xpix\Dropbox\arduino-1.5.4\libraries\FastLED/FastLED.h:139: undefined reference to '__cxa_guard_release' Blink.cpp.o: In function 'ClocklessController_Trinket<(unsigned char)3, 4, 10, 6, (EOrder)10, 50>::showRGBInternal_AdjTime(int, bool, int, unsigned char, unsigned char const*)': C:\Users\xpix\Dropbox\arduino-1.5.4\libraries\FastLED/clockless_trinket.h:84: undefined reference to 'timer0_millis' C:\Users\xpix\Dropbox\arduino-1.5.4\libraries\FastLED/clockless_trinket.h:84: undefined reference to 'timer0_millis' C:\Users\xpix\Dropbox\arduino-1.5.4\libraries\FastLED/clockless_trinket.h:84: undefined reference to 'timer0_millis' C:\Users\xpix\Dropbox\arduino-1.5.4\libraries\FastLED/clockless_trinket.h:84: undefined reference to 'timer0_millis' C:\Users\xpix\Dropbox\arduino-1.5.4\libraries\FastLED/clockless_trinket.h:84: undefined reference to 'timer0_millis' Blink.cpp.o:C:\Users\xpix\Dropbox\arduino-1.5.4\libraries\FastLED/clockless_trinket.h:84: more undefined references to 'timer0_millis' follow

I hope u can help :)

cu
Frank

Teensy vs Arduino LPD8806

Hi,

I'm pretty new to the wonderful world of leds. In fact I'm waiting to receive 10m LPD8806 strip. Meanwhile I'm reading stuff and already learned a lot. I have one question though. What frame rate can I expect when reading in serial data for 320 leds (LPD8806). Would a teensy do better and what version of teensy should I buy? Thank you in advance!

Newbe alert !!!! Problems with LPD8806 IC

Hi there total newbe to FastLED so sorry in advance. I thought I would download and install the FastLED library to my Arduino program and plug in my LED strip purchased from Ebay (See Photo of specs)
screen shot 2014-03-27 at 21 16 52

get my Arduino out and load the examples in to see what happened. Well no code error and the LEDS come on, just not like they are suppose to.

include "FastLED.h"

// How many leds in your strip?

define NUM_LEDS 32

// For led chips like Neopixels, which have a data line, ground, and power, you just
// need to define DATA_PIN. For led chipsets that are SPI based (four wires - data, clock,
// ground, and power), like the LPD8806, define both DATA_PIN and CLOCK_PIN

define DATA_PIN 3

define CLOCK_PIN 13

// Define the array of leds
CRGB leds[NUM_LEDS];

void setup() {
FastLED.addLeds<LPD8806, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
}

void loop() {
// First slide the led in one direction
for(int i = 0; i < NUM_LEDS; i++) {
// Set the i'th led to red
leds[i] = CRGB::Red;
// Show the leds
FastLED.show();
// now that we've shown the leds, reset the i'th led to black
leds[i] = CRGB::Black;
// Wait a little bit before we loop around and do it again
delay(30);
}

// Now go in the other direction.  
for(int i = NUM_LEDS-1; i >= 0; i--) {
    // Set the i'th led to red 
    leds[i] = CRGB::Red;
    // Show the leds
    FastLED.show();
    // now that we've shown the leds, reset the i'th led to black
    leds[i] = CRGB::Black;
    // Wait a little bit before we loop around and do it again
    delay(30);
}

}

Link to video
https://plus.google.com/photos/116336226552256699988/albums/5995594642412828097?hl=en

I Hope someone can help

SparkCore support

Implement pin and hardware spi support for the STM32 in the SparkCore.

Problem with Adafruit Trinket + NEOPIXELS

Hi,

I am trying to use FastLED with an Adafruit Trinket and a NEOPIXEL strip (30 LEDs/meter)

I am using the FastLED master branch as per 2014-03-23.

Here is the test program I am using:

#include "FastLED.h"

#define DATA_PIN 0
#define NUM_LEDS 6

CRGB leds[NUM_LEDS];

void setup() {
    delay(2000);

#if 1
    FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS);
    // Does not work, and is currently equal to:
    //CLEDController *pLed = new ClocklessController_Trinket<DATA_PIN, 2, 5, 3, GRB>();
    //FastLED.addLeds(pLed, leds, NUM_LEDS);
#else
    CLEDController *pLed = new ClocklessController<DATA_PIN, 2, 5, 3, GRB>();
    FastLED.addLeds(pLed, leds, NUM_LEDS);
#endif
}

void loop() {
    leds[0] = CRGB::Red;
    leds[1] = CRGB::Green;
    leds[2] = CRGB::Green;
    leds[3] = CRGB::Blue;
    leds[4] = CRGB::Blue;
    leds[5] = CRGB::Blue;
    FastLED.show();
    delay(1000);
}

When I run the code above I get 5 white LEDs.
If i replace the #if 1 into an #if 0 and use ClocklessController instead of the default ClocklessController_Trinket the LEDs work as expected.

Any idea of what is going on?

Thanks,
Antonio

FastLED with avr/sleep.h

Hi All,

Firstly, what a great library!

I'm using it in a project with an WS2812B attached to a Sparkfun ProMicro 32u4. When I put the arduino into standby the LED is flashing alternate red / green and I can't seem to stop it. (I've tried setting the LED to 0,0,0, black etc but nothing works. Any ideas as it's playing havoc with my attempts to save battery life?

Also, I've also noticed that R and G are switched around in the library when selecting the WS1812B. To get a full green I have to use 255,0,0 and to get a full red I have to use 0,255,0. Not sure if this is a problem with the library or whether I was sold the wrong LED's!

Regards,

Simon

WS2801 Timing issue - Calling FastLED.show() too quickly does not update the LEDs.

This is the RGBCalibrate code stripped down to the bare minimum. It works as long as there is a delay after FastLED.show(). Change the delay (1) to delay (0) and it no longer updates the LEDs.

#include "FastLED.h"
#define NUM_LEDS 6
CRGB leds[NUM_LEDS];

void setup() {
   delay(2000);
   FastLED.addLeds<WS2801, RGB>(leds, NUM_LEDS);
}

void loop() {
   leds[0] = CRGB::Red; 
   leds[1] = CRGB::Green;
   leds[2] = CRGB::Green;
   leds[3] = CRGB::Blue;
   leds[4] = CRGB::Blue;
   leds[5] = CRGB::Blue;
   FastLED.show();
   delay(1);
}

Support TLC5940

I would like to help to get the TLC5940 support started ... but I am confused as to how to. Is there anyone else who is working on this (tlc5940) support or another chip that I could see how adding a chip is done? Is there a mailing list or forum where developers meet?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.