// CHANGING LEDS INTENSITY int led1 = 4; int boton1 = 3; int estadob1 = 0; void setup() { pinMode(led1, OUTPUT); ; pinMode(boton1, INPUT); } void loop() { estadob1 = digitalRead (boton1); if (estadob1 == HIGH) { analogWrite(4, 55); delay(100); analogWrite(4, 114); delay(125); analogWrite(4, 175); delay(150); analogWrite(4, 255); delay(175); } else { digitalWrite (led1, LOW);//We turn the LED off } }