-
Notifications
You must be signed in to change notification settings - Fork 1
/
waterfall.m
120 lines (119 loc) · 3.41 KB
/
waterfall.m
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
clear all
clc
board=arduino('COM3')
for j=2:13;
pinMode(board,j,'OUTPUT');
end
binaryimg=[
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 1 1 1 1 1 1 1 1 0 0 0
0 0 1 1 1 1 1 1 1 1 1 0 0 0
0 0 1 1 1 1 0 0 1 1 1 1 0 0
0 0 1 1 1 0 0 0 0 1 1 1 0 0
0 0 1 1 1 0 0 0 0 1 1 1 0 0
0 0 1 1 1 0 0 0 0 1 1 1 0 0
0 0 1 1 1 0 0 0 0 0 0 0 0 0
0 0 1 1 1 0 0 0 0 0 0 0 0 0
0 0 1 1 1 0 0 0 0 0 0 0 0 0
0 0 1 1 1 0 0 0 0 0 0 0 0 0
0 0 1 1 1 0 0 0 0 0 0 0 0 0
0 0 1 1 1 0 0 0 0 0 0 0 0 0
0 0 1 1 1 0 0 0 0 0 0 0 0 0
0 0 1 1 1 0 0 0 0 0 0 0 0 0
0 0 1 1 1 0 0 0 0 1 1 1 0 0
0 0 1 1 1 0 0 0 0 1 1 1 0 0
0 0 1 1 1 0 0 0 1 1 1 1 0 0
0 0 1 1 1 1 1 1 1 1 1 0 0 0
0 0 0 1 1 1 1 1 1 1 1 0 0 0
0 0 0 0 1 1 1 1 1 1 0 0 0 0
0 0 0 0 0 0 1 0 0 0 0 0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];
for i=1:length(binaryimg);
digitalWrite(board,2,binaryimg(i,2));
digitalWrite(board,3,binaryimg(i,3));
digitalWrite(board,4,binaryimg(i,4));
digitalWrite(board,5,binaryimg(i,5));
digitalWrite(board,6,binaryimg(i,6));
digitalWrite(board,7,binaryimg(i,7));
digitalWrite(board,8,binaryimg(i,8));
digitalWrite(board,9,binaryimg(i,9));
digitalWrite(board,10,binaryimg(i,10));
digitalWrite(board,11,binaryimg(i,11));
digitalWrite(board,12,binaryimg(i,12));
digitalWrite(board,13,binaryimg(i,13));
pause(0.1);
end