int greenled = D0; int whiteled = D6; int orangeled = D7; int brightness = 0; // how bright the LED is int fadeAmount = 5; // how many points to fade the LED by void setup() { pinMode(greenled, OUTPUT); pinMode(whiteled, OUTPUT); pinMode(orangeled, OUTPUT); } void loop() { // set the brightness of the leds analogWrite(greenled, brightness); analogWrite(whiteled, brightness); analogWrite(orangeled, brightness); // change the brightness for next time through the loop: brightness = brightness + fadeAmount; if (brightness <= 0 || brightness >= 255) { fadeAmount = -fadeAmount; } // wait for 30 milliseconds to see the dimming effect delay(30); }