I have connected a single neopixel to my Adafruit Feather board, running Arduino software.
The power pin is connected to 3V on the Feather. The data-in pin is connected to pin 15 on the Feather.
As soon as power is connected, the light shows blue. But uploading any program has no effect whatsoever. The Neopixel won't respond to anything.
How can I use a Neopixel on the Adafruit Feather?
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h>
#endif
#define PIN 15
#define NUMPIXELS 1
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
void setup() {
Serial.begin(9600);
pixels.begin();
}
void loop() {
Serial.println("RED");
pixels.setPixelColor(PIN, pixels.Color(255, 0, 0));
pixels.show();
delay(1000);
Serial.println("GREEN");
pixels.setPixelColor(PIN, pixels.Color(0, 255, 0));
pixels.show();
delay(1000);
}
The neopixel and the Feather board