-
Notifications
You must be signed in to change notification settings - Fork 0
/
ButtonCode.c
95 lines (94 loc) · 2.24 KB
/
ButtonCode.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
void setup()
{
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
pinMode(10, OUTPUT);
pinMode(9, OUTPUT);
pinMode(8, OUTPUT);
pinMode(13, OUTPUT);
pinMode(12, OUTPUT);
pinMode(11, OUTPUT);
pinMode(5, OUTPUT);
pinMode(7, OUTPUT);
pinMode(6, OUTPUT);
}
void loop()
{
//s0
digitalWrite(2, HIGH);
digitalWrite(10, HIGH);
digitalWrite(13, HIGH);
digitalWrite(5, HIGH);
delay(1000); // Wait for 1000 millisecond(s)
//s1
digitalWrite(2, LOW);
digitalWrite(3, HIGH);
digitalWrite(10, LOW);
digitalWrite(9, HIGH);
digitalWrite(8, LOW);
digitalWrite(13, HIGH);
digitalWrite(12, LOW);
digitalWrite(11, LOW);
digitalWrite(5, HIGH);
digitalWrite(7, LOW);
digitalWrite(6, LOW);
delay(1000); // Wait for 1000 millisecond(s)
//s2
digitalWrite(2, LOW);
digitalWrite(3, LOW);
digitalWrite(4, HIGH);
digitalWrite(10, LOW);
digitalWrite(9, LOW);
digitalWrite(8, HIGH);
digitalWrite(13, HIGH);
digitalWrite(12, LOW);
digitalWrite(11, LOW);
digitalWrite(5, HIGH);
digitalWrite(7, LOW);
digitalWrite(6, LOW);
delay(1000); // Wait for 1000 millisecond(s)
//s3
digitalWrite(2, LOW);
digitalWrite(3, LOW);
digitalWrite(4, HIGH);
digitalWrite(10, LOW);
digitalWrite(9, LOW);
digitalWrite(8, HIGH);
digitalWrite(13, LOW);
digitalWrite(12, LOW);
digitalWrite(11, HIGH);
digitalWrite(5, LOW);
digitalWrite(7, HIGH);
digitalWrite(6, LOW);
delay(5000); // Wait for 5000 millisecond(s)
//s4
digitalWrite(2, LOW);
digitalWrite(3, LOW);
digitalWrite(4, HIGH);
digitalWrite(10, LOW);
digitalWrite(9, LOW);
digitalWrite(8, HIGH);
digitalWrite(13, LOW);
digitalWrite(12, HIGH);
digitalWrite(11, LOW);
digitalWrite(5, LOW);
digitalWrite(7, LOW);
digitalWrite(6, HIGH);
delay(1000); // Wait for 1000 millisecond(s)
//s5
digitalWrite(2, LOW);
digitalWrite(3, LOW);
digitalWrite(4, HIGH);
digitalWrite(10, LOW);
digitalWrite(9, LOW);
digitalWrite(8, HIGH);
digitalWrite(13, HIGH);
digitalWrite(12, LOW);
digitalWrite(11, LOW);
digitalWrite(5, HIGH);
digitalWrite(7, LOW);
digitalWrite(6, LOW);
delay(1000); // Wait for 1000 millisecond(s)
//Next s0
}