/* Blink From "Arduino IDE EXAMPLES - BASICS - BLINK". then slightly modified to choose correct output ports for our 3 LEDs and make them blink in sequence. Turns an LED on for one second, then off for one second, repeatedly. Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to the correct LED pin independent of which board is used. If you want to know what pin the on-board LED is connected to on your Arduino model, check the Technical Specs of your board at: https://www.arduino.cc/en/Main/Products modified 8 May 2014 by Scott Fitzgerald modified 2 Sep 2016 by Arturo Guadalupi modified 8 Sep 2016 by Colby Newman modified 17 July 2024 by James Khan This example code is in the public domain. https://www.arduino.cc/en/Tutorial/BuiltInExamples/Blink */ // the setup function runs once when you press reset or power the board void setup() { // initialize digital pins 26, 0, and 1 as an output. pinMode(26, OUTPUT); pinMode(0, OUTPUT); pinMode(1, OUTPUT); } // the loop function runs over and over again forever void loop() { digitalWrite(26, HIGH); // turn the LED 1 on (HIGH is the voltage level) delay(500); // wait for half second digitalWrite(0, HIGH); // turn the LED 2 on (HIGH is the voltage level) delay(500); // wait for half a second digitalWrite(1, HIGH); // turn the LED 3 on (HIGH is the voltage level) delay(500); // wait for half second digitalWrite(26, LOW); // turn the LED 1 off by making the voltage LOW delay(500); // wait for a half second digitalWrite(0, LOW); // turn the LED 2 off by making the voltage LOW delay(500); // wait for a half second digitalWrite(1, LOW); // turn the LED 3 off by making the voltage LOW delay(500); // wait for a half second }