Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int led13 = 13;
- int led12 = 12;
- int led11 = 11;
- int led10 = 10;
- int led9 = 9;
- int led8 = 8;
- int led7 = 7;
- int pausetime=1000;
- void setup() {
- pinMode(led13, OUTPUT); //pin13
- pinMode(led12, OUTPUT); //pin12
- pinMode(led11, OUTPUT); //pin11
- pinMode(led10, OUTPUT); //pin10
- pinMode(led9, OUTPUT); //pin9
- pinMode(led8, OUTPUT); //pin8
- pinMode(led7, OUTPUT); //pin7
- digitalWrite(led13, LOW);
- digitalWrite(led12, LOW);
- digitalWrite(led11, LOW);
- digitalWrite(led10, LOW);
- digitalWrite(led9, LOW);
- digitalWrite(led8, LOW);
- digitalWrite(led7, LOW);
- }
- void loop() {
- //0
- digitalWrite(led12, HIGH);
- digitalWrite(led11, HIGH);
- digitalWrite(led10, HIGH);
- digitalWrite(led9, HIGH);
- digitalWrite(led8, HIGH);
- digitalWrite(led7, HIGH);
- delay(pausetime);
- digitalWrite(led12, LOW);
- digitalWrite(led11, LOW);
- digitalWrite(led10, LOW);
- digitalWrite(led9, LOW);
- digitalWrite(led8, LOW);
- digitalWrite(led7, LOW);
- //1
- digitalWrite(led12, HIGH);
- digitalWrite(led9, HIGH);
- delay(pausetime);
- digitalWrite(led12, LOW);
- digitalWrite(led9, LOW);
- //2
- digitalWrite(led13, HIGH);
- digitalWrite(led11, HIGH);
- digitalWrite(led10, HIGH);
- digitalWrite(led9, HIGH);
- digitalWrite(led8, HIGH);
- delay(pausetime);
- digitalWrite(led13, LOW);
- digitalWrite(led11, LOW);
- digitalWrite(led10, LOW);
- digitalWrite(led9, LOW);
- digitalWrite(led8, LOW);
- //3
- digitalWrite(led13, HIGH);
- digitalWrite(led11, HIGH);
- digitalWrite(led10, HIGH);
- digitalWrite(led7, HIGH);
- digitalWrite(led8, HIGH);
- delay(pausetime);
- digitalWrite(led13, LOW);
- digitalWrite(led11, LOW);
- digitalWrite(led10, LOW);
- digitalWrite(led7, LOW);
- digitalWrite(led8, LOW);
- //4
- digitalWrite(led13, HIGH);
- digitalWrite(led12, HIGH);
- digitalWrite(led10, HIGH);
- digitalWrite(led7, HIGH);
- delay(pausetime);
- digitalWrite(led13, LOW);
- digitalWrite(led12, LOW);
- digitalWrite(led10, LOW);
- digitalWrite(led7, LOW);
- //5
- digitalWrite(led13, HIGH);
- digitalWrite(led11, HIGH);
- digitalWrite(led12, HIGH);
- digitalWrite(led7, HIGH);
- digitalWrite(led8, HIGH);
- delay(pausetime);
- digitalWrite(led13, LOW);
- digitalWrite(led11, LOW);
- digitalWrite(led12, LOW);
- digitalWrite(led7, LOW);
- digitalWrite(led8, LOW);
- //6
- digitalWrite(led13, HIGH);
- digitalWrite(led12, HIGH);
- digitalWrite(led11, HIGH);
- digitalWrite(led7, HIGH);
- digitalWrite(led8, HIGH);
- digitalWrite(led9, HIGH);
- delay(pausetime);
- digitalWrite(led13, LOW);
- digitalWrite(led12, LOW);
- digitalWrite(led11, LOW);
- digitalWrite(led7, LOW);
- digitalWrite(led8, LOW);
- digitalWrite(led9, LOW);
- //7
- digitalWrite(led12, HIGH);
- digitalWrite(led11, HIGH);
- digitalWrite(led10, HIGH);
- digitalWrite(led7, HIGH);
- delay(pausetime);
- digitalWrite(led10, LOW);
- digitalWrite(led12, LOW);
- digitalWrite(led11, LOW);
- digitalWrite(led7, LOW);
- //8
- digitalWrite(led13, HIGH);
- digitalWrite(led12, HIGH);
- digitalWrite(led11, HIGH);
- digitalWrite(led10, HIGH);
- digitalWrite(led9, HIGH);
- digitalWrite(led8, HIGH);
- digitalWrite(led7, HIGH);
- delay(pausetime);
- digitalWrite(led13, LOW);
- digitalWrite(led12, LOW);
- digitalWrite(led11, LOW);
- digitalWrite(led10, LOW);
- digitalWrite(led9, LOW);
- digitalWrite(led8, LOW);
- digitalWrite(led7, LOW);
- //9
- digitalWrite(led13, HIGH);
- digitalWrite(led12, HIGH);
- digitalWrite(led11, HIGH);
- digitalWrite(led10, HIGH);
- digitalWrite(led8, HIGH);
- digitalWrite(led7, HIGH);
- delay(pausetime);
- digitalWrite(led13, LOW);
- digitalWrite(led12, LOW);
- digitalWrite(led11, LOW);
- digitalWrite(led10, LOW);
- digitalWrite(led8, LOW);
- digitalWrite(led7, LOW);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement