-
Notifications
You must be signed in to change notification settings - Fork 1
/
WATERFALL.ino
77 lines (73 loc) · 2.72 KB
/
WATERFALL.ino
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
int binaryimg[34][14]{
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0},
{1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0},
{1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0},
{1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1},
{1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0},
{1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0},
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0},
{0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0},
{0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0},
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1},
{1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0},
{0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1},
{1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1},
{0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
};
void setup() {
// put your setup code here, to run once:
for (int j = 2; j < 16; j++) {
pinMode(j,OUTPUT);
};
for (int i = 34; i >= 0 ; i = i-1 ) {
digitalWrite(2,abs((binaryimg[i][13])-1));
digitalWrite(3,abs((binaryimg[i][12])-1));
digitalWrite(4,abs((binaryimg[i][11])-1));
digitalWrite(5,abs((binaryimg[i][10])-1));
digitalWrite(6,abs((binaryimg[i][9])-1));
digitalWrite(7,abs((binaryimg[i][8])-1));
digitalWrite(8,abs((binaryimg[i][7])-1));
digitalWrite(9,abs((binaryimg[i][6])-1));
digitalWrite(10,abs((binaryimg[i][5])-1));
digitalWrite(11,abs((binaryimg[i][4])-1));
digitalWrite(12,abs((binaryimg[i][3])-1));
digitalWrite(13,abs((binaryimg[i][2])-1));
digitalWrite(14,abs((binaryimg[i][1])-1));
digitalWrite(15,abs((binaryimg[i][14])-1));
delay(50);
};
Serial.begin(9600);
Serial.println();
Serial.println("Print Array Before Overwriting The Content");
int a, b;
for (a = 0; a < 34; a++) {
for (b = 0; b < 15; b++) {
Serial.print(binaryimg [a] [b]);
Serial.print(' ');
};
Serial.println();
};
}
void loop() {
// put your main code here, to run repeatedly:
}