Módulo RGB LED para Arduino Keyestudio
Color: red, green and blue
Brightness: High
Voltage: 5V
Input: digital level
Size: 30 * 20mm
REF: KS0032
Este módulo LED contém três cores básicas: vermelho, verde e azul. Após a programação, é possível ligá-los e desligá-los em sequência ou também utilizar a saída analógica PWM para misturar as três cores para gerar cores diferentes.
2,10€ IVA INCL.
Color: red, green and blue
Brightness: High
Voltage: 5V
Input: digital level
Size: 30 * 20mm
Marca |
---|
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); } 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); }