int i = 0; const int LED1 = 3; //define the pin we use for LED const int LED2 = 6; const int LED3 = 9; const int LED4 = 11; void setup() { pinMode(LED1, OUTPUT); //set pin 3 as OUTPUT pinMode(LED2, OUTPUT); //set pin 6 as OUTPUT pinMode(LED3, OUTPUT); //set pin 9 as OUTPUT pinMode(LED4, OUTPUT); //set pin 11 as OUTPUT } void loop() { for (int i = 0; i < 255; i++){ //if i is less than 255 then increase i with 1 analogWrite(LED1, i); //write the i value to pin 3 analogWrite(LED2, i); //write the i value to pin 6 analogWrite(LED3, i); //write the i value to pin 9 analogWrite(LED4, i); //write the i value to pin 11 delay(5); //wait 5 ms then do the for loop again } for (int i = 255; i > 0; i--){ //descrease i with 1 analogWrite(LED1, i); analogWrite(LED2, i); analogWrite(LED3, i); analogWrite(LED4, i); delay(5); } }