The Adafruit NeoPixel Jewel is a compact, circular LED module that features seven individually addressable RGB LEDs. These LEDs are based on the WS2812 or the upgraded WS2812B, which integrate the control circuit and RGB chip into a single 5050 (5mm x 5mm) package. The NeoPixel Jewel's unique arrangement and individual addressability make it ideal for creating intricate lighting effects, wearable electronics, and decorative projects. Its compatibility with platforms like Arduino makes it accessible for hobbyists and professionals alike.
Pin | Description |
---|---|
VDD | Power supply (4-7V DC) |
GND | Ground connection |
DIN | Data input from microcontroller |
DOUT | Data output to the next LED/input of another NeoPixel |
Power Supply: Connect the VDD pin to a suitable power supply (4-7V DC) and the GND pin to the ground. Ensure that the power supply can handle the current requirements if multiple NeoPixel Jewels are chained together.
Data Connection: Connect the DIN pin to a digital output pin on your microcontroller (e.g., an Arduino UNO). If chaining multiple NeoPixel Jewels, connect the DOUT pin of the first to the DIN pin of the next.
Programming: Use the Adafruit NeoPixel library to control the LEDs. Install the library through the Arduino Library Manager and include it in your sketches to create custom lighting effects.
#include <Adafruit_NeoPixel.h>
#define PIN 6 // Define the pin connected to the NeoPixel data input
#define NUMPIXELS 7 // Number of LEDs in the NeoPixel Jewel
Adafruit_NeoPixel pixels(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
void setup() {
pixels.begin(); // Initialize the NeoPixel Jewel
}
void loop() {
for(int i=0; i<NUMPIXELS; i++) {
pixels.setPixelColor(i, pixels.Color(150, 0, 150)); // Set color to purple
pixels.show(); // Update the Jewel with set colors
delay(500);
pixels.setPixelColor(i, pixels.Color(0, 0, 0)); // Turn off the LED
}
}
Q: Can I chain multiple NeoPixel Jewels together? A: Yes, you can chain them by connecting DOUT of one Jewel to DIN of the next. Ensure your power supply can handle the increased current draw.
Q: How do I control each LED individually?
A: Use the setPixelColor()
function in the Adafruit NeoPixel library, specifying the LED index and color.
Q: What is the maximum number of NeoPixel Jewels I can control with an Arduino? A: It depends on the Arduino's RAM and your power supply. Each LED requires 3 bytes of RAM, so calculate based on your Arduino's specifications.
Q: Can I use the NeoPixel Jewel with a 3.3V microcontroller? A: While the NeoPixel Jewel operates at 4-7V, many 3.3V microcontrollers can still control it. However, for reliable operation, level shifting to 5V for the data line is recommended.