The Adafruit NeoPixel FeatherWing is an add-on board for the Adafruit Feather ecosystem. It features a matrix of individually addressable RGB LEDs, commonly known as NeoPixels. These LEDs can be controlled with a single microcontroller pin and offer full 24-bit color, which allows for a wide range of color blending and animations. The FeatherWing is ideal for creating colorful and complex lighting effects for wearables, indicators, displays, and any project requiring a splash of vibrant color.
Pin | Description |
---|---|
GND | Ground connection |
VBAT | Power supply (3.3V to 5V) |
DIN | Data input from microcontroller |
DOUT | Data output for chaining additional NeoPixel devices |
#include <Adafruit_NeoPixel.h>
#define PIN 6 // The pin connected to the NeoPixels
#define NUMPIXELS 32 // Number of NeoPixels in the FeatherWing
// Create an instance of the Adafruit_NeoPixel class called "pixels"
Adafruit_NeoPixel pixels(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
void setup() {
pixels.begin(); // Initialize the NeoPixel library.
}
void loop() {
for(int i=0; i<NUMPIXELS; i++) {
pixels.setPixelColor(i, pixels.Color(0,150,0)); // Moderately bright green color.
pixels.show(); // This sends the updated pixel color to the hardware.
delay(500); // A half-second delay between each pixel set.
pixels.setPixelColor(i, pixels.Color(0,0,0)); // Turn off the pixel.
}
}
Ensure that the Adafruit NeoPixel library is installed in your Arduino IDE before uploading this code to your Arduino UNO.
Q: Can I use a 3.3V logic level with the NeoPixel FeatherWing?
A: Yes, the NeoPixel FeatherWing can typically understand 3.3V logic; however, for reliability, especially with longer wires, a logic level converter is recommended.
Q: How many NeoPixel FeatherWings can I chain together?
A: This depends on your power supply's capacity. Each NeoPixel can draw up to 60mA, so calculate your requirements accordingly.
Q: Can I cut the FeatherWing to fit a smaller space?
A: No, the FeatherWing is not designed to be cut. Doing so may damage the board and the NeoPixels.