รหัสสินค้า | AS00051 |
หมวดหมู่ | LED / LED Drive |
ราคา | 25.00 บาท |
สถานะสินค้า | พร้อมส่ง |
จำนวน | ชิ้น |
RGB LED 5mm Module (Common Cathode)
โมดูล RGB LED 5 mm เหมาะสำหรับการใช้ตกแต่งเพื่อความสวยงานของอุปกรณ์ สามารถแสดงสีได้แต่ละสี 256 ระดับ ทำให้แสดงสีได้ว่า 16 ล้าน shade สี (256x256x256) นอกจากนี้ยังสามารถใช้ฝึกหัดในการควบคุม RGB matrix module
การต่อใช้งาน
R --> Port 9
G --> Port 10
B --> Port 11
V -- > GND
Pin out: (GND), R , B , G
PCB Dimension: 19x15mm
Weight: 2g
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.
Product Features:
1 the use of plug-in full-color LED
2 RGB trichromatic limiting resistor to prevent burnout
3 through the PWM adjusting three primary colors can be mixed to obtain different colors
4 with a variety of single-chip interface
5 the working voltage: 5V
6 LED drive mode: common cathode driver
Arduino test code:
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);
}
ตัวอย่าง Sketch เพื่อใช้งาน module
/** Code for cross-fading 3 LEDs, red, green and blue (RGB)* To create fades, you need to do two things:* 1. Describe the colors you want to be displayed* 2. List the order you want them to fade in** DESCRIBING A COLOR:* A color is just an array of three percentages, 0-100,* controlling the red, green and blue LEDs** Red is the red LED at full, blue and green off* int red = { 100, 0, 0 }* Dim white is all three LEDs at 30%* int dimWhite = {30, 30, 30}* etc.** Some common colors are provided below, or make your own** LISTING THE ORDER:* In the main part of the program, you need to list the order* you want to colors to appear in, e.g.* crossFade(red);* crossFade(green);* crossFade(blue);** Those colors will appear in that order, fading out of* one color and into the next** In addition, there are 5 optional settings you can adjust:* 1. The initial color is set to black (so the first color fades in), but* you can set the initial color to be any other color* 2. The internal loop runs for 1020 interations; the 'wait' variable* sets the approximate duration of a single crossfade. In theory,* a 'wait' of 10 ms should make a crossFade of ~10 seconds. In* practice, the other functions the code is performing slow this* down to ~11 seconds on my board. YMMV.* 3. If 'repeat' is set to 0, the program will loop indefinitely.* if it is set to a number, it will loop that number of times,* then stop on the last color in the sequence. (Set 'return' to 1,* and make the last color black if you want it to fade out at the end.)* 4. There is an optional 'hold' variable, which pasues the* program for 'hold' milliseconds when a color is complete,* but before the next color starts.* 5. Set the DEBUG flag to 1 if you want debugging output to be* sent to the serial monitor.** The internals of the program aren't complicated, but they* are a little fussy -- the inner workings are explained* below the main loop.** April 2007, Clay Shirky |
Link ที่น่าสนใจ
http://learn.adafruit.com/adafruit-arduino-lesson-3-rgb-leds
ชำระเงินค่าสินค้าโดยการโอนเงินเข้าบัญชีธนาคาร KBANK, SCB, BBL,TMB
กรุณาเก็บหลักฐานการโอนเงินของท่านไว้เพื่อแจ้งการชำระเงินด้วยค่ะ
ท่านสามารถแจ้งการชำระเงินผ่านระบบอัตโนมัติได้โดย Click Link ข้างล่างค่ะ
https://www.arduitronics.com/informpayment
หน้าที่เข้าชม | 15,375,197 ครั้ง |
ผู้ชมทั้งหมด | 5,878,275 ครั้ง |
เปิดร้าน | 21 พ.ค. 2556 |
ร้านค้าอัพเดท | 5 ก.ย. 2568 |