Introduction
These LED string lights are composed of a series of LEDs that have a colorful glow. They can be used as decorations and for other interesting applications. Use them as outdoor string lights, string lights in your bedroom, on your patio or on a globe. There are many applications, what can you think of?
Note: Use the provided adapter to power the string to avoid risk of damage.
Specification
- Operating Voltage: 2.5 - 5V (5V Recommended)
- LED Length: 4 meters / 40 LEDs
- Adapter Board Dimensions: 30 x 22 mm / 1.18 x 0.86 "
Board Overview
No. | Label | Description |
---|---|---|
1 | Signal | Input Signal |
2 | VCC | Power + |
3 | GND | Power - |
Tutorial
In this section, we'll tell you how to use the LED module
Requirements
Hardware
- DFRduino UNO (or similar) x 1
- LED String x 1
- M-M/F-M/F-F Jumper wires
Software
Connection Diagram
Sample Code
/***************************************************
* LED String Lights
* ****************************************************
* Control a String Light to fade in and out
* @author Dongzi(1185787528@qq.com)
* @version V1.0
* @date 2016-5-26
* All above must be included in any redistribution
* ****************************************************/
int t;
#define Light_string 3
void setup() {
pinMode( Light_string, OUTPUT);
}
void loop() {
for(t=5;t<255;t++ ) // turn the Light string on (HIGH is the voltage level) little and little.
{
analogWrite( Light_string, t);
delay(10);
}
if(t>=255) // turn the Light string off (HIGH is the voltage level) little and little.
{
for(t==255;t>5;t--)
{
analogWrite( Light_string, t);
delay(10);
}
}
}
FAQ
For any questions, advice or cool ideas to share, please visit the DFRobot Forum. |