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.
@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.)
@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.
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.