Created
July 8, 2019 05:08
-
-
Save surinoel/546d56e26125d9bb70d819037dfec627 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int pinLED =13; | |
int aPinLed[8] = {13, 12 ,11, 10, 9, 8, 7, 6}; | |
void setup() { | |
// put your setup code here, to run once: | |
for(int i=0; i<8; i++) { | |
pinMode(aPinLed[i], OUTPUT); | |
} | |
} | |
void loop() { | |
// put your main code here, to run repeatedly: | |
for(int i=0; i<14; i++) { | |
int j; | |
if(!(i/8)) j = i; | |
else j = 6 - (i % 8); | |
digitalWrite(aPinLed[j], HIGH); | |
delay(1000); | |
digitalWrite(aPinLed[j], LOW); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment