Hey FastLED friends, Anyone have any experience working with the Arduino Zero?

Hey FastLED friends,

Anyone have any experience working with the Arduino Zero?

I went ahead and got one to see if it’ll work well for my current project, but I’m having trouble getting it to work with FastLED with Dotstars (APA102C). I know that support is recent as of 3.1, so wanted to see if there are any caveats at the moment.

I originally used some code that I confirmed works fine with the Arduino Uno, but no dice on the Arduino Zero. I went ahead and switched the library to Adafruit’s Dotstar library (https://github.com/adafruit/Adafruit_DotStar) and it worked fine with the Zero and my circuit which bumps the 3.3V Data and Clock output to 5V before hitting the strip (tested their strandtest example).

Tried with FastLED on both the 3.1 tag and master, and no dice. Here’s a simple program I confirmed works with the Uno, but nothing but a single LED or 2 on full brightness (white) with the Zero. I’ll stick to the Uno for ramping up the project, but if I can swap in the Zero, that’d be awesome:

https://gist.github.com/theaeolianmachine/3f729cf21279579828b6a6df4116ba10

Weird - I’ve done some testing here with the zero and haven’t had any problems with it. Have you tried any other pair of pins? (It’s possible there’s a pin definition problem on FastLED’s side).

I have a zero here that I can dig out to try to do some testing at some point this week.

Hey @Daniel_Garcia , just noticed your comment. I tried other pins (8 & 9), and it worked! Seems like there’s something up with pins 4 and 5 for the zero (regardless of which one for data or clock).

Also just tried a jumper from the ICSP header for SPI (using the default pins that are set in fastpin_arm_d21.h), and that’s working great at the moment as well.

Thanks for the great suggestion again! Honestly should have been a bit more tenacious :).

I’ve run into similar problems using a Sparkfun SAMD21 Dev Board (which uses the same MCU as the Arduino Zero, but a slightly modified firmware). I pulled my hair out for a while before realizing that some pins just don’t work with WS2812B LEDs and/or FastLED.

Using the FirstLight example sketch I tested every pin and found that 0,1,2,4 on the SAMD32 board don’t work. I moved on and used some other pins, but I’m curious why this is happening with those pins.

Probably because the pin to port mappings have been changed - because of how FastLED works they need to be specifically specified for each board. Honestly I haven’t done much with the zero since the initial port - it’s one of those boards that falls into the realm of “why does this even exist?” for me - not sure there’s much reason to use it over a teensy.

Honestly had just really heard the hype around the Teensy, and just bought a few - looking forward to using it on future projects!