I'm still semi-new to Arduino programming, particularly with my own assembled hardware,

I’m still semi-new to Arduino programming, particularly with my own assembled hardware, and I’m really struggling to understand why I can get my LEDs to light up with the Adafruit Neopixel library, but can’t do the same with FastLED.

I’m programming an Adafruit Circuit Playground Express, driving the WS2812’s on this thing:

(the playground works off 3V, so my LED data line is being piped through a level shifter, also with the resistors/capacitors that the Adafruit “neopixel basics” tutorial recommends)

My code is here:

The first version of code there (using Adafruit’s Neopixel library) works just fine for me: my LED strobes. But the second version (using FastLED) never lights up the LED (I can println to the console and find that the loop code is executing over and over, it’s just specifically that the LEDs don’t respond). Are there any obvious known “gotchas” that I’m missing here?

In case it matters: I’m using Arduino IDE version 1.8.5, and FastLED 3.1.3.

Your FastLED code incomplete (ignore this).

Can you please start with the examples that are included with the FastLED library?

They can also be found at:

@Andrew_Tuline I agree it would be good to test with the examples that are known to work. Do you see something missing though? (Without actually trying it… it looks like it should work.)

@marmil Didn’t see the FastLED.show on the same line as the other code…

I assume those are two separate files he’s showing.

@Michael_Weiss-Malik Which level shifter are you using?

Give the FastLED examples a test to confirm things are/aren’t working with those.

@Andrew_Tuline Yes, it was two separate files… they’re so small, I just assumed it was easier to paste them as one, instead of viewing as two links.

@marmil I’m using the 74AHCT125 level shifter from Adafruit. I was worried that something about my wiring was “the problem,” until I realized that a simple example using the Adafruit library worked great, so I assume at this point that it’s purely a software issue.

I’ll give the “official” examples linked a test (though won’t be able to until tomorrow). And in particular, I’ll try a few variants of which LED type is being specified in the initialization. The code I supplied was a variant of one of the examples I saw in a FastLED tutorial.

Thanks for the help, everyone! I’ll post back when I’ve had a chance to try the above.

@Jeremy_Spencer Have you used this level shifter?

@Michael_Weiss-Malik which board are you using and which version of the Fastled library ?
Thank you

@marmil yes, these work fine. They’re pretty much just half of the eight channel shifter.

You have to enable each channel by connecting the enable pin to ground, so it’s more complicated to wire up than the eight channel version.

Add delays after the two FastLED.show statements. The led may be too dim to see.

Woohoo! Finally working.

I initially tried the Blink.ino standard example, and it wasn’t working. I tried uncommenting a few variants of the LED type in the FastLED.addLeds declaration, and it still didn’t work.

Then the Arduino IDE was bugging me for some library upgrades, at which point I realized – I had included the FastLED version number in my original post, but I think I may have mis-read the dialog box in the IDE! I said I was using v3.1.3, but I think I actually needed to update the library to that version :). In any case, after updating FastLED (as well as a bunch of others), the code is now working! (both the standard example, and the test that I originally posted, and the fancier code that I was actually trying to implement)

One last Q: compilation is now generating a pragma warning from fastspi.h that “No hardware SPI pins defined. All SPI access will default to bitbanged output”. My code is working at this point, but… any suggestions on whether/how I should be silencing that?

Scratch part of that – I’m now on FastLED 3.1.6 according to the IDE, although at compile-time I’m getting a pragma warning that says it’s version FastLED version 3.001.007.

@Michael_Weiss-Malik You can ignore both of those pragma warnings. I think they are just there for informational purposes.