Axiometa
RGB LED
RGB LED
SKU:AX22-0006
Low stock: 5 left
Regular price
$2.49
Regular price
Sale price
$2.49
Unit price
per
Taxes included.
Shipping calculated at checkout.
Couldn't load pickup availability

Technical Details
Pinout
Arduino Example Snippet
// Pin numbers for the RGB LED
#define RED_PIN 1
#define GREEN_PIN 14
#define BLUE_PIN 41
const int brightness = 25; //0-255
void setup() {
// Initialize the RGB LED pins as outputs
pinMode(RED_PIN, OUTPUT);
pinMode(GREEN_PIN, OUTPUT);
pinMode(BLUE_PIN, OUTPUT);
}
void loop() {
// Fade in and out red
for (int i = 0; i <= brightness; i++) {
analogWrite(RED_PIN, i);
delay(50);
}
for (int i = brightness; i >= 0; i--) {
analogWrite(RED_PIN, i);
delay(50);
}
// Fade in and out green
for (int i = 0; i <= brightness; i++) {
analogWrite(GREEN_PIN, i);
delay(50);
}
for (int i = brightness; i >= 0; i--) {
analogWrite(GREEN_PIN, i);
delay(50);
}
// Fade in and out blue
for (int i = 0; i <= brightness; i++) {
analogWrite(BLUE_PIN, i);
delay(50);
}
for (int i = brightness; i >= 0; i--) {
analogWrite(BLUE_PIN, i);
delay(50);
}
// Fade through a range of colors
for (int i = 0; i <= brightness; i++) {
analogWrite(RED_PIN, i);
analogWrite(GREEN_PIN, brightness - i);
analogWrite(BLUE_PIN, i / 2);
delay(50);
}
for (int i = brightness; i >= 0; i--) {
analogWrite(RED_PIN, i);
analogWrite(GREEN_PIN, brightness - i);
analogWrite(BLUE_PIN, i / 2);
delay(50);
}
}