DFRobot DFR0274 빠른 시작 매뉴얼 - 페이지 3

{카테고리_이름} DFRobot DFR0274에 대한 빠른 시작 매뉴얼을 온라인으로 검색하거나 PDF를 다운로드하세요. DFRobot DFR0274 12 페이지. Rgb led strip driver shield

DFRobot DFR0274 빠른 시작 매뉴얼
Sample Code
LED Strip driving code
Here's the basic code for controlling the color of the RGB LED strip.
int RedPin = 10;
int GreenPin = 11;
int BluePin = 9;
void setColor(int red, int green, int blue)
{
analogWrite(RedPin, red);
analogWrite(GreenPin, green);
analogWrite(BluePin, blue);
}
void setup()
{
pinMode(RedPin, OUTPUT);
pinMode(GreenPin, OUTPUT);
pinMode(BluePin, OUTPUT);
Serial.begin(9600);
}
void loop()
{
for (int i=0;i<255;i++)
{
setColor(i, 0, 0);
delay (10);
}
delay(2000);
for (int i=0;i<255;i++)
{
Arrow.com.
Arrow.com.
Arrow.com.
Downloaded from
Downloaded from
Downloaded from
//Arduino driving pin for Red
//Arduino driving pin for Green
//Arduino driving pin for Blue
//Init Arduino driving pins
//Changing Red brightness
//Changing Green brightness