An LED RGB Strip is a flexible circuit board populated with Light Emitting Diodes (LEDs) that can emit red, green, and blue light. These strips are widely used for ambient lighting, accent lighting, and creative DIY projects due to their versatility and ease of use. They can be found in residential, commercial, and industrial settings, enhancing the aesthetics of spaces or serving functional lighting purposes.
Pin | Description |
---|---|
VCC | Power supply (positive) |
GND | Ground (negative) |
DI | Data input for addressable strips |
DO | Data output for connecting additional strips (addressable strips) |
R | Red color control (for non-addressable strips) |
G | Green color control (for non-addressable strips) |
B | Blue color control (for non-addressable strips) |
// Example code to control an addressable RGB LED Strip with an Arduino UNO
#include <FastLED.h>
#define LED_PIN 6
#define NUM_LEDS 30
#define BRIGHTNESS 64
#define LED_TYPE WS2812B
#define COLOR_ORDER GRB
CRGB leds[NUM_LEDS];
void setup() {
FastLED.addLeds<LED_TYPE, LED_PIN, COLOR_ORDER>(leds, NUM_LEDS)
.setCorrection(TypicalLEDStrip);
FastLED.setBrightness(BRIGHTNESS);
}
void loop() {
// Fill the dots one after the other with a color
for(int i = 0; i < NUM_LEDS; i++) {
leds[i] = CRGB::White;
FastLED.show();
delay(30);
leds[i] = CRGB::Black;
}
}
Note: The above code uses the FastLED library to control addressable RGB LED strips. It lights up each LED in sequence. Make sure to install the FastLED library through the Arduino Library Manager before uploading this sketch.
FAQs:
Q: Can I cut the LED strip to size?
Q: How do I connect multiple strips together?
Q: Can I control the strip with a remote?