LED_String_Lights__Warm_White__SKU__DFR0448-DFRobot

Introduction

These LED string lights are composed of a series of LEDs that have a warm white 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?

warning_yellow.png Note: Use the provided adapter to power the string to avoid risk of damage.

Specification

Board Overview

Name_DFR0448_Board.png

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

Connection Diagram

DFR0448_Connection_Diagram.png

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.

More Documents