본문 바로가기
project/2020.12-02 (라즈베리파이) 눈으로운전하는휠체어

RGB LED module spec

by sj0020 2021. 1. 22.

 

www.devicemart.co.kr/goods/view?no=1287089#goods_file

 

아두이노 RGB LED 모듈 [SZH-EK058]

아두이노와 호환되는 5파이 고휘도 RGB LED 모듈입니다.

www.devicemart.co.kr

  • Using 5050 full color LED
  • RGB trichromatic limiting resistor to prevent burnout
  • Through the PWM adjusting three primary colors can be mixed to obtain different colors
  • With a variety of single-chip interface
  • Operating voltage: 5V
  • LED drive mode: common cathode
int redpin = 11; //select the pin for the red LED
int bluepin =10; // select the pin for the blue LED

int greenpin =9;// select the pin for the green LED

 

int val;

 

void setup() {

pinMode(redpin OUTPUT);

pinMode(bluepin OUTPUT);

pinMode(greenpin OUTPUT);

Serial.begin(9600);

}

 

void loop()

{

for(val=255; val>0; val--)

{

analogWrite(11 val);

analogWrite(10 255-val);

analogWrite(9 128-val);

delay(1);

}

for(val=0; val<255; val++)

{

analogWrite(11 val);

analogWrite(10 255-val);

analogWrite(9 128-val);

delay(1);

}

Serial.println(val DEC);