I'd like to shift my projects from using the Adafruit Dotstar library to FastLED

I’d like to shift my projects from using the Adafruit Dotstar library to FastLED but am not sure what’s up. I’m testing with a new 1/2 meter 144 pixel Dotstar using Arduino 1.8.5 and a Teensy 3.2. The hardware runs code created using Dotstar but not, so far, with FastLED 3.1.8 ( which was installed using the library manager) . Using Blink as a test, the code compiles fine, uploads but does not run on the hardware. The code was only modded to select the setup. I’ve tried dropping the data rate and using a second Teensy. I’ve also purged the Arduino install and re-installed. Thoughts?

Possibilities that come to mind are that the clock and data lines are reversed or possibly you have faulty LEDs.

Do the LEDs work with the Adafruit library?

Can you share your setup code?

Also, try setting the data rate to 1mHz, if that works, increase the speed, till it stops working then set it a little slower than that…

@Jeremy_Spencer I’ve swapped the clock and data lines with no luck. Likewise trying to operate at a much lower data rate. The setup code is the FastLED Blink example with the Dotstar line uncommented. The Teensy and Dotstar strip work together with code compiled using the Adafruit Dotstar Library.

Did you add the data rate ?
FastLED.addLeds<APA102, RGB, DATA_RATE_MHZ(1)>(leds, NUM_LEDS);

APA102s and DOTSTARs are the same thing…

Yes, in order to test the data rate.

@PaulStoffregen , do you have any ideas?

Which pins are you using?

You said you only changed the setup code… did you also change the strip.setPixelColor instructions?

@Greg_Garriss Please put your code on http://gist.github.com and share the link.

Are you using a 74HCT245N for level shifting?
Imgur

I’m using the Teensy’s pins 11 and 13 for data and clock. No level shifting as this was not needed previously when using the Dotstar library to run the strip. I haven’t added a strip.setPixelcolor instruction. The code I am attempting to run is just the FastLED Blink example with the last Dotstar setup uncommented. I have tried including the data rate to reduce it to 1 MHz but to no effect.

I would recommend adding the level shifter.

You don’t normally need a level shifter for APA102Cs…

I feel like we’ve had this exact same question before, were the setup worked with Adafruit library but not with the FastLED library. Maybe it wasn’t with a Teensy and APA102 LEDs though.

I’m pretty sure that last time this came up, slowing the speed down solved it…

I’m pretty sure that the Adafruit library runs at 1mHz.

Ah ok, I see why you suggested the super low 1MHz. (I haven’t used the Adafruit library in forever.) Greg said he tried that though so I’m wondering what else?

@Jason_Coon @JP_Roy @Andrew_Tuline remember anything?

I just reversed the data and clock pin definitions and the strip is working. Despite the Teensy data sheet labels, 13 is now my data pin and 11 is now the clock. Operation seems to work up to 5 MHz. I’ll get another strip on order and see if this is repeatable when I get to the shop. Mahalo for the help!

I would expect the Teensy data sheet is correct. The label on the LED strip is probably backwards (unfortunately a somewhat common occurrence).

Glad it’s working for you now Greg!

Also, lots of manufacturers randomly ship compatible SK series chips…