/* * Blink All * * Example created for ME102. It blinks all LED's connected * to the output of the DM7414. Output signals are sent out on * pins 11, 10, 9, 7, 6. * http://www.arduino.cc/en/Tutorial/Blink */ int pwmPins[] = {11, 10, 9, 7, 6}; void setup() // run once, when the sketch starts { for (int i = 0; i<=4; i++){ pinMode (pwmPins[i], OUTPUT); } } void loop() // run over and over again { if(digitalRead(4)==HIGH){ for (int i = 0; i<=4; i++){ digitalWrite(pwmPins[i], HIGH); }; delay(500); for (int i = 0; i<=4; i++){ digitalWrite(pwmPins[i], LOW); }; delay(500); } }