Description
Size: 25 * 21 mm
Weight: 4 g
Color: full color red, green, blue three primary colors
Brightness: highlight
Voltage: 5 v
Input: digital level
Interface: the Arduinos 4 p interface
Platform: the Arduinos, single chip microcomputer
Second, the product features:
Tricolor principle according to the multiple colors
Through the PWM port control to realize full color display
Arduinos PWM interface can be driven directly
Three, module function test
Hardware requirements
Arduinos x 1 controller
USB cable (1
Full color LED module by 1
Test code:
int redpin = 11; /lect 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);
}
Reviews
There are no reviews yet.