// ======================================================================= // Arduino Sketch - simple blink LEDs // ======================================================================= // ---- setup function - runs once when reset button pressed or board powered on void setup() { // initialize GIOs pinMode(13, OUTPUT); pinMode( 5, OUTPUT); pinMode( 6, OUTPUT); pinMode( 7, OUTPUT); pinMode( 8, OUTPUT); pinMode( 9, OUTPUT); // Initialize the serial port - Use one of these rates: // 300, 600, 1200, 2400, 4800, 9600, 14400, 19200, 28800, // 38400, 57600, or 115200. Serial.begin(14400); } // ---- blink LED void blink_led(int led) { digitalWrite(led, HIGH); // turn the LED on delay(300); // wait for 3/10 second digitalWrite(led, LOW); // turn the LED off } // ---- Triple Blink LED void triple_blink(int led) { blink_led(led); // first blink delay(500); // pause after blink blink_led(led); // second blink delay(500); // pause after blink blink_led(led); // third blink delay(1000); // final pause after blink } // ---- main loop - run forever void loop() { Serial.println("Call triple blink for each LED"); Serial.flush(); triple_blink(13); triple_blink(5); triple_blink(6); triple_blink(7); triple_blink(8); triple_blink(9); }