// John Carlo D. Martin
// BSCPE4A
const int FirstLed = 3;
const int SecondLed = 5;
const int ThirdLed = 6;
int brightness = 0;
int fadeAmount = 5;
void setup() {
pinMode(FirstLed, OUTPUT);
pinMode(SecondLed, OUTPUT);
pinMode(ThirdLed, OUTPUT);
}
void loop() {
analogWrite(FirstLed, brightness);
analogWrite(SecondLed, brightness);
analogWrite(ThirdLed, brightness);
brightness += fadeAmount;
if (brightness <= 0 || brightness >= 255) {
fadeAmount = -fadeAmount;
}
delay(25);
}