The Adafruit Pixie is a compact, chainable, and programmable RGB LED board that is perfect for adding vibrant and colorful lighting effects to your projects. Each Pixie module features 5 individually addressable LEDs, allowing for a wide range of color mixing and animation possibilities. Common applications include wearable electronics, custom lighting setups, and interactive art installations.
Pin Number | Name | Description |
---|---|---|
1 | VCC | Power supply (4-7V DC) |
2 | TX | UART transmit to Pixie |
3 | RX | UART receive from previous Pixie (for chaining) |
4 | GND | Ground connection |
#include <SoftwareSerial.h>
SoftwareSerial pixieSerial(-1, 6); // RX, TX
void setup() {
pixieSerial.begin(115200); // Start serial communication at 115200 baud
}
void loop() {
// Send a color to the Pixie
// Colors are sent as 3 bytes, one for each color (R, G, B)
pixieSerial.write(255); // Red
pixieSerial.write(0); // Green
pixieSerial.write(0); // Blue
delay(500); // Wait for half a second
// Send another color
pixieSerial.write(0); // Red
pixieSerial.write(255); // Green
pixieSerial.write(0); // Blue
delay(500); // Wait for half a second
}
Note: The -1
in SoftwareSerial
indicates that we're not using the RX pin in this example. The TX pin is connected to pin 6 on the Arduino.
Q: How many Pixies can I chain together? A: The number of Pixies you can chain is limited by the power supply and the ability of the microcontroller to drive the signal down the chain. Keep the total current draw in mind.
Q: Can I use the Pixie with a 3.3V microcontroller? A: Yes, but ensure that the Pixie is powered with a voltage within its specified range (4-7V). The data signal from a 3.3V microcontroller should be sufficient for communication.
Q: How do I program complex animations? A: Complex animations require careful timing and sequencing of color changes. You can use arrays to store color patterns and loops to iterate through them.
For further assistance, visit the Adafruit support forums or the Pixie product page for additional resources and community projects.