KY-016 RGB FULL COLOR LED MODULE
$14.4
$24.19
The KY-016 Full Color RGB LED emits a wide range of different colors by mixing red, green and blue light. Compatible with many popular microcontrollers like Arduino, Raspberry Pi and ESP32.KY-016 SPECIFICATIONSThis module consists of a 5mm RGB LED, 3 150Ω limiting resistors to prevent burnout and 4 male header pins. Adjusting the PWM signal on each color pin will result on different colors. Operating Voltage5VLED Drive ModeCommon cathode driveLED Diameter5mmBoard Size15mm x 19mm [0.59in x 0.75in] CONNECTION DIAGRAMConnect the module red pin ® to pin 11 on the Arduino. Blue (B) to pin 10, green (G) to pin 9 and ground (-) to GND. KY-016ArduinoRPin 11BPin 10GPin 9–GND KY-016 ARDUINO CODE The following Arduino sketch will gradually increase/decrease the PWM values on the red, green and blue pins causing the LED to cycle through various colors. 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); Serial.println(val, DEC); delay(5); } for(val = 0; val < 255; val ) { analogWrite(11, val); analogWrite(10, 255 - val); analogWrite(9, 128 - val); Serial.println(val, DEC); delay(5); } }1234567891011121314151617181920212223242526272829int redpin = 11; // select the pin for the red LEDint bluepin =10; // select the pin for the blue LEDint greenpin =9; // select the pin for the green LEDint 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); Serial.println(val, DEC); delay(5); } for(val = 0; val < 255; val ) { analogWrite(11, val); analogWrite(10, 255 - val); analogWrite(9, 128 - val); Serial.println(val, DEC); delay(5); }} DOWNLOAD https://arduinomodules.info/download/ky-016-rgb-full-color-led-module-zip-file/https://arduinomodules.info/ky-016-rgb-full-color-led-module/
Leds