Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adafruit M0 Express Built-in LED #736

McCallisterMicro opened this Issue Feb 14, 2019 · 1 comment


None yet
2 participants
Copy link

McCallisterMicro commented Feb 14, 2019

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:

#include <Metro.h>
#include <FastLED.h>
//#include <Adafruit_NeoPixel.h>

uint8_t isLEDON;
Metro Ticker = Metro(100);
CRGB dot[1];
//Adafruit_NeoPixel strip = Adafruit_NeoPixel(1, 40, NEO_GRB + NEO_KHZ800);

void setup()
	pinMode(13, OUTPUT);
	pinMode(40, OUTPUT);
	FastLED.addLeds<NEOPIXEL, 40>(dot, 1);


void loop()
	if (Ticker.check())
		digitalWrite(13, isLEDON ? HIGH : LOW);
		isLEDON = !isLEDON;;

	dot[0] = CRGB::White;
	//strip.setPixelColor(0, 255, 255, 255);


This comment has been minimized.

Copy link

focalintent commented 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.