You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
area: coreLED drivers, color math, animationsdeferredTriage pass could not resolve this; skipped by ci/oldest_issue.pystatus: staleNo activity for 60+ daysstatus: triageNeeds initial assessment
I've been experimenting with an Adafruit Metro M0 Express board, and I'm having some trouble activating the built-in Neopixel on the board. The pixel is on pin 40. The code works fine when hooking up a strip externally - I tested on on Pin 7 and had no issue. I just can't seem to access the built-in Neopixel.
I tested the Adafruit Neopixel library and was able to get it to work using simliar code. I'm guessing it has something to do with how the board is defined, but that's a bit beyond my current coding understanding.
Here is my example code with the Adafruit library code commented out for comparison:
the pin/port definition for pin40 might be wrong on that board (fastled uses its own mappings to go from pins to low level hardware registers) - i’ll have to see if i can dig up what it should be
By any chance, has this been addressed in release 3.4? If not; I think I may be able to assist, but I don't quite know where to start. If I could get some guidance on the files/directories where this is handled, I bet I could suss it out and add in the needed code.
Deferred by automated triage: Real, still-unfixed, and the mechanism is now identified. src/platforms/arm/d21/fastpin_arm_d21.h has explicit cases for CIRCUITPLAYGROUND_EXPRESS, HALLOWING, XIAO_M0, SEEED_ZERO, SODAQ_AUTONOMO, SAMD_WINO, MKR1000/MKRWIFI1010/MKRZERO, NANO_33_IOT, GEMMA_M0, TRINKET_M0, QTPY_M0, ITSYBITSY_M0, PIXELTRINKEY_M0 and a final ARDUINO_SAMD_ZERO fallback -- but NONE for ADAFRUIT_METRO_M0_EXPRESS (hiduino confirmed this in 2019 and it is still true). The Metro therefore falls through to the ARDUINO_SAMD_ZERO block, which DOES define pin 40 as _FL_DEFPIN(40, 6, 0) i.e. PA06 -- the Arduino Zero's pinout, not the Metro's. That explains the reported symptom exactly: no compile error (pin 40 is 'valid'), external strips on pin 7 work, but the built-in NeoPixel on pin 40 does nothing because FastLED is toggling the wrong pad. Confirms focalintent's 2019 hypothesis that 'the pin/port definition for pin 40 might be wrong on that board'. NOT FIXED HERE deliberately: the correct port/bit for the Metro M0 Express onboard NeoPixel has to come from Adafruit's variant.cpp/variant.h for that board and be verified on hardware. Guessing it would be worse than the status quo -- pin 40 currently maps to PA06, which may be a real signal on the Metro, so a wrong guess could drive an unintended pad rather than merely not working. There is no Metro M0 Express in CI, so nothing would catch a bad mapping. Contributor needs: the board's variant pin-40 port/bit, a _FL_DEFPIN block modeled on the ADAFRUIT_ITSYBITSY_M0 case at line 237, and a hardware check.
Marking deferred — still broken, and @focalintent's 2019 hypothesis turns out to be exactly right. Here's the mechanism.
src/platforms/arm/d21/fastpin_arm_d21.h has explicit pin maps for a long list of SAMD21 boards — Circuit Playground Express, Hallowing, XIAO M0, Seeed Zero, SODAQ Autonomo, WINO, MKR1000/MKRWIFI1010/MKRZERO, Nano 33 IoT, Gemma M0, Trinket M0, QT Py M0, ItsyBitsy M0, PixelTrinkey M0 — and then a final ARDUINO_SAMD_ZERO fallback.
There is still no ADAFRUIT_METRO_M0_EXPRESS case.@hiduino confirmed that in 2019 and it remains true.
So the Metro falls through to the Zero block, which does define pin 40:
That accounts for your symptom precisely, including the confusing parts:
No compile error — pin 40 is "valid", so static_assert(validpin()) passes.
External strip on pin 7 works — that pin's mapping happens to be right.
Built-in NeoPixel does nothing — FastLED is toggling PA06, not the pad the onboard pixel is wired to.
Adafruit_NeoPixel works — it goes through the core's own pin table rather than FastLED's compile-time register mapping.
Why I'm not just adding the mapping. The correct port/bit has to come from Adafruit's variant.cpp/variant.h for the Metro M0 Express and be checked on hardware. Guessing would be worse than the current bug: pin 40 presently resolves to PA06, which may well be a real signal on that board, so a wrong guess could drive an unintended pad instead of merely doing nothing. There's no Metro M0 Express in CI, so nothing would catch it.
For anyone with the board — this is a genuinely small, well-scoped first contribution:
Read pin 40's port and bit out of the Adafruit variant for metro_m0.
Add an #elif defined(ADAFRUIT_METRO_M0_EXPRESS) block modeled on the ADAFRUIT_ITSYBITSY_M0 case at line 237 — note that one already handles a similar "onboard pixel on a high pin number" situation.
Confirm the onboard NeoPixel lights before opening the PR.
area: coreLED drivers, color math, animationsdeferredTriage pass could not resolve this; skipped by ci/oldest_issue.pystatus: staleNo activity for 60+ daysstatus: triageNeeds initial assessment
Activity
focalintent commentedon Feb 14, 2019
the pin/port definition for pin40 might be wrong on that board (fastled uses its own mappings to go from pins to low level hardware registers) - i’ll have to see if i can dig up what it should be
hiduino commentedon Aug 29, 2019
There currently is no pin definitions for the ADAFRUIT_METRO_M0_EXPRESS as of FastLED v3.3.2.
McCallisterMicro commentedon Jan 1, 2021
By any chance, has this been addressed in release 3.4? If not; I think I may be able to assist, but I don't quite know where to start. If I could get some guidance on the files/directories where this is handled, I bet I could suss it out and add in the needed code.
zackees commentedon Aug 1, 2026
Deferred by automated triage: Real, still-unfixed, and the mechanism is now identified. src/platforms/arm/d21/fastpin_arm_d21.h has explicit cases for CIRCUITPLAYGROUND_EXPRESS, HALLOWING, XIAO_M0, SEEED_ZERO, SODAQ_AUTONOMO, SAMD_WINO, MKR1000/MKRWIFI1010/MKRZERO, NANO_33_IOT, GEMMA_M0, TRINKET_M0, QTPY_M0, ITSYBITSY_M0, PIXELTRINKEY_M0 and a final ARDUINO_SAMD_ZERO fallback -- but NONE for ADAFRUIT_METRO_M0_EXPRESS (hiduino confirmed this in 2019 and it is still true). The Metro therefore falls through to the ARDUINO_SAMD_ZERO block, which DOES define pin 40 as _FL_DEFPIN(40, 6, 0) i.e. PA06 -- the Arduino Zero's pinout, not the Metro's. That explains the reported symptom exactly: no compile error (pin 40 is 'valid'), external strips on pin 7 work, but the built-in NeoPixel on pin 40 does nothing because FastLED is toggling the wrong pad. Confirms focalintent's 2019 hypothesis that 'the pin/port definition for pin 40 might be wrong on that board'. NOT FIXED HERE deliberately: the correct port/bit for the Metro M0 Express onboard NeoPixel has to come from Adafruit's variant.cpp/variant.h for that board and be verified on hardware. Guessing it would be worse than the status quo -- pin 40 currently maps to PA06, which may be a real signal on the Metro, so a wrong guess could drive an unintended pad rather than merely not working. There is no Metro M0 Express in CI, so nothing would catch a bad mapping. Contributor needs: the board's variant pin-40 port/bit, a _FL_DEFPIN block modeled on the ADAFRUIT_ITSYBITSY_M0 case at line 237, and a hardware check.
zackees commentedon Aug 1, 2026
Marking deferred — still broken, and @focalintent's 2019 hypothesis turns out to be exactly right. Here's the mechanism.
src/platforms/arm/d21/fastpin_arm_d21.hhas explicit pin maps for a long list of SAMD21 boards — Circuit Playground Express, Hallowing, XIAO M0, Seeed Zero, SODAQ Autonomo, WINO, MKR1000/MKRWIFI1010/MKRZERO, Nano 33 IoT, Gemma M0, Trinket M0, QT Py M0, ItsyBitsy M0, PixelTrinkey M0 — and then a finalARDUINO_SAMD_ZEROfallback.There is still no
ADAFRUIT_METRO_M0_EXPRESScase. @hiduino confirmed that in 2019 and it remains true.So the Metro falls through to the Zero block, which does define pin 40:
That accounts for your symptom precisely, including the confusing parts:
static_assert(validpin())passes.Why I'm not just adding the mapping. The correct port/bit has to come from Adafruit's
variant.cpp/variant.hfor the Metro M0 Express and be checked on hardware. Guessing would be worse than the current bug: pin 40 presently resolves to PA06, which may well be a real signal on that board, so a wrong guess could drive an unintended pad instead of merely doing nothing. There's no Metro M0 Express in CI, so nothing would catch it.For anyone with the board — this is a genuinely small, well-scoped first contribution:
metro_m0.#elif defined(ADAFRUIT_METRO_M0_EXPRESS)block modeled on theADAFRUIT_ITSYBITSY_M0case at line 237 — note that one already handles a similar "onboard pixel on a high pin number" situation.