//************************************** // Name: Twelve LED's Running Lights in Arduino // Description:In this article I would like to share with you a sample applications that I wrote using C in Arduino to perform 12 LED's Running Lights. The source code is very simple and easy to understand. I am currently accepting programming work, it projects, school and application development. programming projects, thesis and capstone projects, IT consulting. work, computer tutorials, and web development work kindly contact me in the following email address for further details. If you want to advertise on my website kindly contact me also in my email address also. Thank you. My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com. My mobile number here in the Philippines is 09173084360. My telephone number at home here in Bacolod City, Negros Occidental Philippines is +63 (034) 4335675. Here in Bacolod I also accepting computer repair, networking and Arduino Project development at a very affordable price. My personal website is http://www.jakerpomperada.com // By: Jake R. Pomperada // // // Inputs:None // // Returns:None // //Assumes:None // //Side Effects:None //************************************** /* A simple program to sequentially turn on and turn off 12 LED's Author : Jake R. Pomperada, MAED-IT January 6, 2019 Sunday Bacolod City, Negros Occidental, Philippines jakerpomperada@gmail.com and jakerpomperada@yahoo.com */ int LED1 = 13; int LED2 = 12; int LED3 = 11; int LED4 = 10; int LED5 = 9; int LED6 = 8; int LED7 = 7; int LED8 = 6; int LED9 = 5; int LED10 = 4; int LED11 = 3; int LED12 = 2; void setup() { pinMode(LED1, OUTPUT); pinMode(LED2, OUTPUT); pinMode(LED3, OUTPUT); pinMode(LED4, OUTPUT); pinMode(LED5, OUTPUT); pinMode(LED6, OUTPUT); pinMode(LED7, OUTPUT); pinMode(LED8, OUTPUT); pinMode(LED9, OUTPUT); pinMode(LED10, OUTPUT); pinMode(LED11, OUTPUT); pinMode(LED12, OUTPUT); } void loop() { digitalWrite(LED1, HIGH);// turn on LED1 delay(200); // wait for 400ms digitalWrite(LED2, HIGH);// turn on LED2 delay(200); // wait for 400ms digitalWrite(LED3, HIGH);// turn on LED3 delay(200); // wait for 400ms digitalWrite(LED4, HIGH);// turn on LED4 delay(200); // wait for 400ms digitalWrite(LED5, HIGH);// turn on LED5 delay(200); // wait for 400ms digitalWrite(LED6, HIGH);// turn on LED6 delay(200); // wait for 400ms digitalWrite(LED7, HIGH);// turn on LED7 delay(200); // wait for 400ms digitalWrite(LED8, HIGH);// turn on LED8 delay(200); // wait for 400ms digitalWrite(LED9, HIGH);// turn on LED9 delay(200); // wait for 400ms digitalWrite(LED10, HIGH);// turn on LED10 delay(200); // wait for 400ms digitalWrite(LED11, HIGH);// turn on LED11 delay(200); // wait for 400ms digitalWrite(LED12, HIGH);// turn on LED12 delay(200); // wait for 400ms digitalWrite(LED1, LOW); // turn off LED1 delay(200); // wait for 400ms digitalWrite(LED2, LOW); // turn off LED2 delay(200); // wait for 300ms digitalWrite(LED3, LOW); // turn off LED3 delay(200); // wait for 400ms digitalWrite(LED4, LOW); // turn off LED4 delay(200); // wait for 300ms digitalWrite(LED5, LOW); // turn off LED5 delay(200); // wait for 400ms digitalWrite(LED6, LOW); // turn off LED6 delay(200); // wait for 400ms digitalWrite(LED7, LOW); // turn off LED7 delay(200); // wait for 400ms digitalWrite(LED8, LOW); // turn off LED8 delay(200); // wait for 300ms digitalWrite(LED9, LOW); // turn off LED9 delay(200); // wait for 400ms digitalWrite(LED10, LOW); // turn off LED10 delay(200); // wait for 400ms digitalWrite(LED11, LOW); // turn off LED11 delay(200); // wait for 400ms digitalWrite(LED12, LOW); // turn off LED8 delay(200); // wait for 300ms before running program all over again }