//CONFIGURACIÓN DEL PULSADOR
pinMode (pinpuls, INPUT);
}
void
loop() {
// put your main code here, to run repeatedly:
// SI PULSAMOS EL PULSADOR SE ENCENDERA EL LED3
valuepuls = digitalRead (pinpuls);
if
(valuepuls == HIGH)
{
colorWipe(strip.Color(0,0,0),0);
VIOLETA (RED=60,GREEN=0,BLUE=60)
colorWipe(strip.Color(númRED,númGREEN,númBLUE), 0)
}
else
{
colorWipe(strip.Color(60,0,0),0);
(RED=60,GREEN=0,BLUE=0)
delay (500);
colorWipe(strip.Color(60,60,0),0);
AMARILLO (RED=60,GREEN=60,BLUE=0)
delay (500);
colorWipe(strip.Color(60,40,0),0);
NARANJA (RED=60,GREEN=40,BLUE=60)
delay (500);
colorWipe(strip.Color(0,60,0),0);
(RED=0,GREEN=60,BLUE=60)
delay (500);
colorWipe(strip.Color(0,0,60),0);
(RED=0,GREEN=0,BLUE=60)
delay (500);
colorWipe(strip.Color(60,0,60),0);
VIOLETA (RED=60,GREEN=0,BLUE=60)
delay (500);
colorWipe(strip.Color(60,60,60),0);
BLANCO (RED=60,GREEN=60,BLUE=60)
delay (500);
}
}
// FUNCION PARA EL COLOR DEL LED RGB
void colorWipe(uint32_t
for(uint16_t
strip.setPixelColor(i, c);
strip.show();
delay(wait);
6
// PULSADOR NO PULSADO
c,
uint8_t
i=0; i<strip.numPixels(); i++) {
www.ebotics.com
// LED RGB = ON ; COLOR
// LED RGB = ON ; COLOR ROJO
// LED RGB = ON ; COLOR
// LED RGB = ON ; COLOR
// LED RGB = ON ; COLOR VERDE
// LED RGB = ON ; COLOR AZUL
// LED RGB = ON ; COLOR
// LED RGB = ON ; COLOR
wait) {