Tin tức
SẢN PHẨM MỚI
DỤNG CỤ

Arduino KY-016 LED RGB

Nhà sản xuất: Khác
Giá bán
25,000₫
  • Số lượng đã bán: 0
  • Số lượng sản phẩm: Còn
  • Phí vận chuyển: Tính phí khi thanh toán

Overview

RGB LED module consists of a plug-in full color LED made by R, G, B three pin PWM voltage input can be adjusted Section three primary colors (red / blue / green) strength in order to achieve full color mixing effect. Control of the module with the Arduino can be achieved Cool lighting effects.

Specifications

  • the use of plug-in 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
  • the working voltage: 5V
  • LED drive mode: common cathode driver

Schematic

  • Arduino pin 11 --> Pin R module
  • Arduino pin 10 --> Pin G module
  • Arduino pin 9 --> Pin B module
  • Arduino pin GND --> Pin - module

You don't need any resistors, these are already included on the module.

Example code

//KY016 3-color LED module
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 (10);
    Serial.println (val, DEC);
  }
  for (val = 0; val <255; val ++)
  {
    analogWrite (11, val);
    analogWrite (10, 255-val);
    analogWrite (9, 128-val);
    delay (10);
    Serial.println (val, DEC);
  }
}