Shahariar Hossain
/
FRDM-K82F_8x8LED_Matrix_nochip
Quick demo for LED 8x8 Matrix with FRDM-K82F
Char_Fonts.cpp@2:4e21ea1275a1, 2018-06-03 (annotated)
- Committer:
- suntopbd
- Date:
- Sun Jun 03 01:14:51 2018 +0000
- Revision:
- 2:4e21ea1275a1
- Child:
- 3:6cdeb3b19afb
Alphabet Library added
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
suntopbd | 2:4e21ea1275a1 | 1 | /* |
suntopbd | 2:4e21ea1275a1 | 2 | C1 C2 C3 C4 C5 C6 C7 C8 |
suntopbd | 2:4e21ea1275a1 | 3 | R1 x x x x x x x x |
suntopbd | 2:4e21ea1275a1 | 4 | R2 x x x x x x x x |
suntopbd | 2:4e21ea1275a1 | 5 | R3 x x x x x x x x |
suntopbd | 2:4e21ea1275a1 | 6 | R4 x x x x x x x x |
suntopbd | 2:4e21ea1275a1 | 7 | R5 x x x x x x x x |
suntopbd | 2:4e21ea1275a1 | 8 | R6 x x x x x x x x |
suntopbd | 2:4e21ea1275a1 | 9 | R7 x x x x x x x x |
suntopbd | 2:4e21ea1275a1 | 10 | R8 x x x x x x x x |
suntopbd | 2:4e21ea1275a1 | 11 | |
suntopbd | 2:4e21ea1275a1 | 12 | */ |
suntopbd | 2:4e21ea1275a1 | 13 | #include "mbed.h" |
suntopbd | 2:4e21ea1275a1 | 14 | #include "Char_Fonts.h" |
suntopbd | 2:4e21ea1275a1 | 15 | |
suntopbd | 2:4e21ea1275a1 | 16 | Timer timer; |
suntopbd | 2:4e21ea1275a1 | 17 | float speed= 0.0; |
suntopbd | 2:4e21ea1275a1 | 18 | float gaptime = 0.0; |
suntopbd | 2:4e21ea1275a1 | 19 | int *dotpointer; |
suntopbd | 2:4e21ea1275a1 | 20 | |
suntopbd | 2:4e21ea1275a1 | 21 | void speed_down(float spd) |
suntopbd | 2:4e21ea1275a1 | 22 | { |
suntopbd | 2:4e21ea1275a1 | 23 | speed = spd; |
suntopbd | 2:4e21ea1275a1 | 24 | } |
suntopbd | 2:4e21ea1275a1 | 25 | void gap_up(float zzz) |
suntopbd | 2:4e21ea1275a1 | 26 | { |
suntopbd | 2:4e21ea1275a1 | 27 | gaptime = zzz; |
suntopbd | 2:4e21ea1275a1 | 28 | } |
suntopbd | 2:4e21ea1275a1 | 29 | // Row Pins // |
suntopbd | 2:4e21ea1275a1 | 30 | DigitalOut R1(PTC9); |
suntopbd | 2:4e21ea1275a1 | 31 | DigitalOut R2(PTC8); |
suntopbd | 2:4e21ea1275a1 | 32 | DigitalOut R3(PTC10); |
suntopbd | 2:4e21ea1275a1 | 33 | DigitalOut R4(PTC11); |
suntopbd | 2:4e21ea1275a1 | 34 | DigitalOut R5(PTA14); |
suntopbd | 2:4e21ea1275a1 | 35 | DigitalOut R6(PTC7); |
suntopbd | 2:4e21ea1275a1 | 36 | DigitalOut R7(PTA16); |
suntopbd | 2:4e21ea1275a1 | 37 | DigitalOut R8(PTA15); |
suntopbd | 2:4e21ea1275a1 | 38 | |
suntopbd | 2:4e21ea1275a1 | 39 | // Col Pins // |
suntopbd | 2:4e21ea1275a1 | 40 | DigitalOut C1(PTD0); |
suntopbd | 2:4e21ea1275a1 | 41 | DigitalOut C2(PTC12); |
suntopbd | 2:4e21ea1275a1 | 42 | DigitalOut C3(PTB17); |
suntopbd | 2:4e21ea1275a1 | 43 | DigitalOut C4(PTB16); |
suntopbd | 2:4e21ea1275a1 | 44 | DigitalOut C5(PTA5); |
suntopbd | 2:4e21ea1275a1 | 45 | DigitalOut C6(PTA13); |
suntopbd | 2:4e21ea1275a1 | 46 | DigitalOut C7(PTA12); |
suntopbd | 2:4e21ea1275a1 | 47 | DigitalOut C8(PTA17); |
suntopbd | 2:4e21ea1275a1 | 48 | |
suntopbd | 2:4e21ea1275a1 | 49 | |
suntopbd | 2:4e21ea1275a1 | 50 | |
suntopbd | 2:4e21ea1275a1 | 51 | // 0 will glow LED and 1 will keep off // |
suntopbd | 2:4e21ea1275a1 | 52 | // Use it to make Icon, Character, Symble // |
suntopbd | 2:4e21ea1275a1 | 53 | |
suntopbd | 2:4e21ea1275a1 | 54 | |
suntopbd | 2:4e21ea1275a1 | 55 | |
suntopbd | 2:4e21ea1275a1 | 56 | int sp[64] = { |
suntopbd | 2:4e21ea1275a1 | 57 | 1,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 58 | 1,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 59 | 1,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 60 | 1,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 61 | 1,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 62 | 1,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 63 | 1,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 64 | 1,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 65 | |
suntopbd | 2:4e21ea1275a1 | 66 | }; |
suntopbd | 2:4e21ea1275a1 | 67 | |
suntopbd | 2:4e21ea1275a1 | 68 | |
suntopbd | 2:4e21ea1275a1 | 69 | |
suntopbd | 2:4e21ea1275a1 | 70 | int Aa[64] = { |
suntopbd | 2:4e21ea1275a1 | 71 | 1,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 72 | 1,1,0,0,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 73 | 1,0,1,1,0,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 74 | 0,1,1,1,1,0,1,1, |
suntopbd | 2:4e21ea1275a1 | 75 | 0,0,0,0,0,0,1,1, |
suntopbd | 2:4e21ea1275a1 | 76 | 0,1,1,1,1,0,1,1, |
suntopbd | 2:4e21ea1275a1 | 77 | 0,1,1,1,1,0,1,1, |
suntopbd | 2:4e21ea1275a1 | 78 | 0,1,1,1,1,0,1,1, |
suntopbd | 2:4e21ea1275a1 | 79 | |
suntopbd | 2:4e21ea1275a1 | 80 | }; |
suntopbd | 2:4e21ea1275a1 | 81 | |
suntopbd | 2:4e21ea1275a1 | 82 | int Bb[64] = { |
suntopbd | 2:4e21ea1275a1 | 83 | 1,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 84 | 0,0,0,0,0,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 85 | 0,1,1,1,1,0,1,1, |
suntopbd | 2:4e21ea1275a1 | 86 | 0,1,1,1,1,0,1,1, |
suntopbd | 2:4e21ea1275a1 | 87 | 0,0,0,0,0,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 88 | 0,1,1,1,1,0,1,1, |
suntopbd | 2:4e21ea1275a1 | 89 | 0,1,1,1,1,0,1,1, |
suntopbd | 2:4e21ea1275a1 | 90 | 0,0,0,0,0,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 91 | |
suntopbd | 2:4e21ea1275a1 | 92 | }; |
suntopbd | 2:4e21ea1275a1 | 93 | |
suntopbd | 2:4e21ea1275a1 | 94 | int Cc[64] = { |
suntopbd | 2:4e21ea1275a1 | 95 | 1,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 96 | 1,1,0,0,0,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 97 | 1,0,1,1,1,0,1,1, |
suntopbd | 2:4e21ea1275a1 | 98 | 0,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 99 | 0,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 100 | 0,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 101 | 1,0,1,1,1,0,1,1, |
suntopbd | 2:4e21ea1275a1 | 102 | 1,1,0,0,0,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 103 | |
suntopbd | 2:4e21ea1275a1 | 104 | }; |
suntopbd | 2:4e21ea1275a1 | 105 | |
suntopbd | 2:4e21ea1275a1 | 106 | |
suntopbd | 2:4e21ea1275a1 | 107 | int Dd[64] = { |
suntopbd | 2:4e21ea1275a1 | 108 | 1,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 109 | 0,0,0,0,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 110 | 0,1,1,1,0,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 111 | 0,1,1,1,1,0,1,1, |
suntopbd | 2:4e21ea1275a1 | 112 | 0,1,1,1,1,0,1,1, |
suntopbd | 2:4e21ea1275a1 | 113 | 0,1,1,1,1,0,1,1, |
suntopbd | 2:4e21ea1275a1 | 114 | 0,1,1,1,0,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 115 | 0,0,0,0,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 116 | |
suntopbd | 2:4e21ea1275a1 | 117 | }; |
suntopbd | 2:4e21ea1275a1 | 118 | |
suntopbd | 2:4e21ea1275a1 | 119 | |
suntopbd | 2:4e21ea1275a1 | 120 | int Ee[64] = { |
suntopbd | 2:4e21ea1275a1 | 121 | 1,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 122 | 0,0,0,0,0,0,1,1, |
suntopbd | 2:4e21ea1275a1 | 123 | 0,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 124 | 0,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 125 | 0,0,0,0,0,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 126 | 0,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 127 | 0,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 128 | 0,0,0,0,0,0,1,1, |
suntopbd | 2:4e21ea1275a1 | 129 | |
suntopbd | 2:4e21ea1275a1 | 130 | }; |
suntopbd | 2:4e21ea1275a1 | 131 | |
suntopbd | 2:4e21ea1275a1 | 132 | |
suntopbd | 2:4e21ea1275a1 | 133 | int Ff[64] = { |
suntopbd | 2:4e21ea1275a1 | 134 | 1,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 135 | 0,0,0,0,0,0,1,1, |
suntopbd | 2:4e21ea1275a1 | 136 | 0,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 137 | 0,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 138 | 0,0,0,0,0,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 139 | 0,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 140 | 0,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 141 | 0,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 142 | |
suntopbd | 2:4e21ea1275a1 | 143 | }; |
suntopbd | 2:4e21ea1275a1 | 144 | |
suntopbd | 2:4e21ea1275a1 | 145 | |
suntopbd | 2:4e21ea1275a1 | 146 | int Gg[64] = { |
suntopbd | 2:4e21ea1275a1 | 147 | 1,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 148 | 1,1,0,0,0,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 149 | 1,0,1,1,1,0,1,1, |
suntopbd | 2:4e21ea1275a1 | 150 | 0,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 151 | 0,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 152 | 0,1,1,0,0,0,1,1, |
suntopbd | 2:4e21ea1275a1 | 153 | 0,1,1,0,1,0,1,1, |
suntopbd | 2:4e21ea1275a1 | 154 | 1,0,0,0,1,0,1,1, |
suntopbd | 2:4e21ea1275a1 | 155 | |
suntopbd | 2:4e21ea1275a1 | 156 | }; |
suntopbd | 2:4e21ea1275a1 | 157 | |
suntopbd | 2:4e21ea1275a1 | 158 | |
suntopbd | 2:4e21ea1275a1 | 159 | int Hh[64] = { |
suntopbd | 2:4e21ea1275a1 | 160 | 1,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 161 | 0,1,1,1,1,0,1,1, |
suntopbd | 2:4e21ea1275a1 | 162 | 0,1,1,1,1,0,1,1, |
suntopbd | 2:4e21ea1275a1 | 163 | 0,1,1,1,1,0,1,1, |
suntopbd | 2:4e21ea1275a1 | 164 | 0,0,0,0,0,0,1,1, |
suntopbd | 2:4e21ea1275a1 | 165 | 0,1,1,1,1,0,1,1, |
suntopbd | 2:4e21ea1275a1 | 166 | 0,1,1,1,1,0,1,1, |
suntopbd | 2:4e21ea1275a1 | 167 | 0,1,1,1,1,0,1,1, |
suntopbd | 2:4e21ea1275a1 | 168 | |
suntopbd | 2:4e21ea1275a1 | 169 | }; |
suntopbd | 2:4e21ea1275a1 | 170 | |
suntopbd | 2:4e21ea1275a1 | 171 | |
suntopbd | 2:4e21ea1275a1 | 172 | int Ii[64] = { |
suntopbd | 2:4e21ea1275a1 | 173 | 1,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 174 | 1,1,0,0,0,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 175 | 1,1,1,0,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 176 | 1,1,1,0,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 177 | 1,1,1,0,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 178 | 1,1,1,0,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 179 | 1,1,1,0,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 180 | 1,1,0,0,0,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 181 | |
suntopbd | 2:4e21ea1275a1 | 182 | }; |
suntopbd | 2:4e21ea1275a1 | 183 | |
suntopbd | 2:4e21ea1275a1 | 184 | |
suntopbd | 2:4e21ea1275a1 | 185 | int Jj[64] = { |
suntopbd | 2:4e21ea1275a1 | 186 | 1,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 187 | 1,0,0,0,0,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 188 | 1,1,1,0,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 189 | 1,1,1,0,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 190 | 1,1,1,0,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 191 | 0,1,1,0,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 192 | 0,1,1,0,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 193 | 1,0,0,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 194 | |
suntopbd | 2:4e21ea1275a1 | 195 | }; |
suntopbd | 2:4e21ea1275a1 | 196 | |
suntopbd | 2:4e21ea1275a1 | 197 | |
suntopbd | 2:4e21ea1275a1 | 198 | int Kk[64] = { |
suntopbd | 2:4e21ea1275a1 | 199 | 0,1,1,1,0,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 200 | 0,1,1,0,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 201 | 0,1,0,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 202 | 0,0,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 203 | 0,1,0,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 204 | 0,1,1,0,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 205 | 0,1,1,1,0,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 206 | 0,1,1,1,1,0,1,1, |
suntopbd | 2:4e21ea1275a1 | 207 | |
suntopbd | 2:4e21ea1275a1 | 208 | }; |
suntopbd | 2:4e21ea1275a1 | 209 | |
suntopbd | 2:4e21ea1275a1 | 210 | |
suntopbd | 2:4e21ea1275a1 | 211 | int Ll[64] = { |
suntopbd | 2:4e21ea1275a1 | 212 | 1,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 213 | 0,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 214 | 0,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 215 | 0,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 216 | 0,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 217 | 0,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 218 | 0,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 219 | 0,0,0,0,0,0,0,1, |
suntopbd | 2:4e21ea1275a1 | 220 | |
suntopbd | 2:4e21ea1275a1 | 221 | }; |
suntopbd | 2:4e21ea1275a1 | 222 | |
suntopbd | 2:4e21ea1275a1 | 223 | int Mm[64] = { |
suntopbd | 2:4e21ea1275a1 | 224 | |
suntopbd | 2:4e21ea1275a1 | 225 | 1,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 226 | 0,0,1,1,1,0,0,1, |
suntopbd | 2:4e21ea1275a1 | 227 | 0,1,0,1,0,1,0,1, |
suntopbd | 2:4e21ea1275a1 | 228 | 0,1,1,0,1,1,0,1, |
suntopbd | 2:4e21ea1275a1 | 229 | 0,1,1,1,1,1,0,1, |
suntopbd | 2:4e21ea1275a1 | 230 | 0,1,1,1,1,1,0,1, |
suntopbd | 2:4e21ea1275a1 | 231 | 0,1,1,1,1,1,0,1, |
suntopbd | 2:4e21ea1275a1 | 232 | 0,1,1,1,1,1,0,1, |
suntopbd | 2:4e21ea1275a1 | 233 | |
suntopbd | 2:4e21ea1275a1 | 234 | }; |
suntopbd | 2:4e21ea1275a1 | 235 | |
suntopbd | 2:4e21ea1275a1 | 236 | |
suntopbd | 2:4e21ea1275a1 | 237 | int Nn[64] = { |
suntopbd | 2:4e21ea1275a1 | 238 | 1,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 239 | 0,1,1,1,1,1,0,1, |
suntopbd | 2:4e21ea1275a1 | 240 | 0,0,1,1,1,1,0,1, |
suntopbd | 2:4e21ea1275a1 | 241 | 0,1,0,1,1,1,0,1, |
suntopbd | 2:4e21ea1275a1 | 242 | 0,1,1,0,1,1,0,1, |
suntopbd | 2:4e21ea1275a1 | 243 | 0,1,1,1,0,1,0,1, |
suntopbd | 2:4e21ea1275a1 | 244 | 0,1,1,1,1,0,0,1, |
suntopbd | 2:4e21ea1275a1 | 245 | 0,1,1,1,1,1,0,1, |
suntopbd | 2:4e21ea1275a1 | 246 | |
suntopbd | 2:4e21ea1275a1 | 247 | }; |
suntopbd | 2:4e21ea1275a1 | 248 | |
suntopbd | 2:4e21ea1275a1 | 249 | int Oo[64] = { |
suntopbd | 2:4e21ea1275a1 | 250 | 1,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 251 | 1,1,0,0,0,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 252 | 1,0,1,1,1,0,1,1, |
suntopbd | 2:4e21ea1275a1 | 253 | 0,1,1,1,1,1,0,1, |
suntopbd | 2:4e21ea1275a1 | 254 | 0,1,1,1,1,1,0,1, |
suntopbd | 2:4e21ea1275a1 | 255 | 0,1,1,1,1,1,0,1, |
suntopbd | 2:4e21ea1275a1 | 256 | 1,0,1,1,1,0,1,1, |
suntopbd | 2:4e21ea1275a1 | 257 | 1,1,0,0,0,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 258 | |
suntopbd | 2:4e21ea1275a1 | 259 | }; |
suntopbd | 2:4e21ea1275a1 | 260 | |
suntopbd | 2:4e21ea1275a1 | 261 | int Pp[64] = { |
suntopbd | 2:4e21ea1275a1 | 262 | 1,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 263 | 0,0,0,0,0,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 264 | 0,1,1,1,1,0,1,1, |
suntopbd | 2:4e21ea1275a1 | 265 | 0,1,1,1,1,0,1,1, |
suntopbd | 2:4e21ea1275a1 | 266 | 0,0,0,0,0,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 267 | 0,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 268 | 0,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 269 | 0,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 270 | |
suntopbd | 2:4e21ea1275a1 | 271 | }; |
suntopbd | 2:4e21ea1275a1 | 272 | |
suntopbd | 2:4e21ea1275a1 | 273 | |
suntopbd | 2:4e21ea1275a1 | 274 | int Qq[64] = { |
suntopbd | 2:4e21ea1275a1 | 275 | 1,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 276 | 1,1,0,0,0,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 277 | 1,0,1,1,1,0,1,1, |
suntopbd | 2:4e21ea1275a1 | 278 | 0,1,1,1,1,1,0,1, |
suntopbd | 2:4e21ea1275a1 | 279 | 0,1,1,1,1,1,0,1, |
suntopbd | 2:4e21ea1275a1 | 280 | 0,1,1,1,0,1,0,1, |
suntopbd | 2:4e21ea1275a1 | 281 | 1,0,1,1,1,0,1,1, |
suntopbd | 2:4e21ea1275a1 | 282 | 1,1,0,0,0,1,0,1, |
suntopbd | 2:4e21ea1275a1 | 283 | }; |
suntopbd | 2:4e21ea1275a1 | 284 | |
suntopbd | 2:4e21ea1275a1 | 285 | |
suntopbd | 2:4e21ea1275a1 | 286 | int Rr[64] = { |
suntopbd | 2:4e21ea1275a1 | 287 | 1,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 288 | 0,0,0,0,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 289 | 0,1,1,1,0,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 290 | 0,1,1,1,0,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 291 | 0,0,0,0,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 292 | 0,1,0,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 293 | 0,1,1,0,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 294 | 0,1,1,1,0,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 295 | |
suntopbd | 2:4e21ea1275a1 | 296 | }; |
suntopbd | 2:4e21ea1275a1 | 297 | |
suntopbd | 2:4e21ea1275a1 | 298 | |
suntopbd | 2:4e21ea1275a1 | 299 | int Ss[64] = { |
suntopbd | 2:4e21ea1275a1 | 300 | 1,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 301 | 1,0,0,0,0,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 302 | 0,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 303 | 0,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 304 | 1,0,0,0,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 305 | 1,1,1,1,0,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 306 | 1,1,1,1,0,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 307 | 0,0,0,0,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 308 | |
suntopbd | 2:4e21ea1275a1 | 309 | |
suntopbd | 2:4e21ea1275a1 | 310 | }; |
suntopbd | 2:4e21ea1275a1 | 311 | |
suntopbd | 2:4e21ea1275a1 | 312 | |
suntopbd | 2:4e21ea1275a1 | 313 | int Tt[64] = { |
suntopbd | 2:4e21ea1275a1 | 314 | 1,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 315 | 0,0,0,0,0,0,0,1, |
suntopbd | 2:4e21ea1275a1 | 316 | 1,1,1,0,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 317 | 1,1,1,0,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 318 | 1,1,1,0,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 319 | 1,1,1,0,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 320 | 1,1,1,0,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 321 | 1,1,1,0,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 322 | |
suntopbd | 2:4e21ea1275a1 | 323 | }; |
suntopbd | 2:4e21ea1275a1 | 324 | |
suntopbd | 2:4e21ea1275a1 | 325 | |
suntopbd | 2:4e21ea1275a1 | 326 | int Uu[64] = { |
suntopbd | 2:4e21ea1275a1 | 327 | 1,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 328 | 0,1,1,1,1,0,1,1, |
suntopbd | 2:4e21ea1275a1 | 329 | 0,1,1,1,1,0,1,1, |
suntopbd | 2:4e21ea1275a1 | 330 | 0,1,1,1,1,0,1,1, |
suntopbd | 2:4e21ea1275a1 | 331 | 0,1,1,1,1,0,1,1, |
suntopbd | 2:4e21ea1275a1 | 332 | 0,1,1,1,1,0,1,1, |
suntopbd | 2:4e21ea1275a1 | 333 | 0,1,1,1,1,0,1,1, |
suntopbd | 2:4e21ea1275a1 | 334 | 1,0,0,0,0,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 335 | |
suntopbd | 2:4e21ea1275a1 | 336 | }; |
suntopbd | 2:4e21ea1275a1 | 337 | |
suntopbd | 2:4e21ea1275a1 | 338 | |
suntopbd | 2:4e21ea1275a1 | 339 | int Vv[64] = { |
suntopbd | 2:4e21ea1275a1 | 340 | 1,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 341 | 0,1,1,1,1,1,0,1, |
suntopbd | 2:4e21ea1275a1 | 342 | 0,1,1,1,1,1,0,1, |
suntopbd | 2:4e21ea1275a1 | 343 | 0,1,1,1,1,1,0,1, |
suntopbd | 2:4e21ea1275a1 | 344 | 0,1,1,1,1,1,0,1, |
suntopbd | 2:4e21ea1275a1 | 345 | 1,0,1,1,1,0,1,1, |
suntopbd | 2:4e21ea1275a1 | 346 | 1,1,0,1,0,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 347 | 1,1,1,0,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 348 | |
suntopbd | 2:4e21ea1275a1 | 349 | |
suntopbd | 2:4e21ea1275a1 | 350 | }; |
suntopbd | 2:4e21ea1275a1 | 351 | |
suntopbd | 2:4e21ea1275a1 | 352 | |
suntopbd | 2:4e21ea1275a1 | 353 | int Ww[64] = { |
suntopbd | 2:4e21ea1275a1 | 354 | 1,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 355 | 0,1,1,1,1,1,0,1, |
suntopbd | 2:4e21ea1275a1 | 356 | 0,1,1,1,1,1,0,1, |
suntopbd | 2:4e21ea1275a1 | 357 | 0,1,1,1,1,1,0,1, |
suntopbd | 2:4e21ea1275a1 | 358 | 0,1,1,1,1,1,0,1, |
suntopbd | 2:4e21ea1275a1 | 359 | 0,1,1,0,1,1,0,1, |
suntopbd | 2:4e21ea1275a1 | 360 | 0,1,0,1,0,1,0,1, |
suntopbd | 2:4e21ea1275a1 | 361 | 1,0,1,1,1,0,1,1, |
suntopbd | 2:4e21ea1275a1 | 362 | |
suntopbd | 2:4e21ea1275a1 | 363 | }; |
suntopbd | 2:4e21ea1275a1 | 364 | |
suntopbd | 2:4e21ea1275a1 | 365 | |
suntopbd | 2:4e21ea1275a1 | 366 | int Xx[64] = { |
suntopbd | 2:4e21ea1275a1 | 367 | 1,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 368 | 0,1,1,1,1,1,0,1, |
suntopbd | 2:4e21ea1275a1 | 369 | 1,0,1,1,1,0,1,1, |
suntopbd | 2:4e21ea1275a1 | 370 | 1,1,0,1,0,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 371 | 1,1,1,0,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 372 | 1,1,0,1,0,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 373 | 1,0,1,1,1,0,1,1, |
suntopbd | 2:4e21ea1275a1 | 374 | 0,1,1,1,1,1,0,1, |
suntopbd | 2:4e21ea1275a1 | 375 | }; |
suntopbd | 2:4e21ea1275a1 | 376 | |
suntopbd | 2:4e21ea1275a1 | 377 | |
suntopbd | 2:4e21ea1275a1 | 378 | int Yy[64] = { |
suntopbd | 2:4e21ea1275a1 | 379 | 1,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 380 | 0,1,1,1,1,1,0,1, |
suntopbd | 2:4e21ea1275a1 | 381 | 1,0,1,1,1,0,1,1, |
suntopbd | 2:4e21ea1275a1 | 382 | 1,1,0,1,0,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 383 | 1,1,1,0,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 384 | 1,1,1,0,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 385 | 1,1,1,0,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 386 | 1,1,1,0,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 387 | |
suntopbd | 2:4e21ea1275a1 | 388 | }; |
suntopbd | 2:4e21ea1275a1 | 389 | |
suntopbd | 2:4e21ea1275a1 | 390 | int Zz[64] = { |
suntopbd | 2:4e21ea1275a1 | 391 | |
suntopbd | 2:4e21ea1275a1 | 392 | 1,1,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 393 | 0,0,0,0,0,0,0,1, |
suntopbd | 2:4e21ea1275a1 | 394 | 1,1,1,1,1,0,1,1, |
suntopbd | 2:4e21ea1275a1 | 395 | 1,1,1,1,0,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 396 | 1,1,1,0,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 397 | 1,1,0,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 398 | 1,0,1,1,1,1,1,1, |
suntopbd | 2:4e21ea1275a1 | 399 | 0,0,0,0,0,0,0,1, |
suntopbd | 2:4e21ea1275a1 | 400 | |
suntopbd | 2:4e21ea1275a1 | 401 | }; |
suntopbd | 2:4e21ea1275a1 | 402 | |
suntopbd | 2:4e21ea1275a1 | 403 | |
suntopbd | 2:4e21ea1275a1 | 404 | |
suntopbd | 2:4e21ea1275a1 | 405 | |
suntopbd | 2:4e21ea1275a1 | 406 | |
suntopbd | 2:4e21ea1275a1 | 407 | |
suntopbd | 2:4e21ea1275a1 | 408 | |
suntopbd | 2:4e21ea1275a1 | 409 | ///////////////// CHAR on MATRIX APIs ////////////////// |
suntopbd | 2:4e21ea1275a1 | 410 | |
suntopbd | 2:4e21ea1275a1 | 411 | void A() |
suntopbd | 2:4e21ea1275a1 | 412 | { |
suntopbd | 2:4e21ea1275a1 | 413 | timer.start(); |
suntopbd | 2:4e21ea1275a1 | 414 | while (timer.read() < speed)// time of how long character will stay |
suntopbd | 2:4e21ea1275a1 | 415 | { |
suntopbd | 2:4e21ea1275a1 | 416 | dotpointer = &Aa[0]; |
suntopbd | 2:4e21ea1275a1 | 417 | disp_page(dotpointer); |
suntopbd | 2:4e21ea1275a1 | 418 | disp_off(); |
suntopbd | 2:4e21ea1275a1 | 419 | } |
suntopbd | 2:4e21ea1275a1 | 420 | timer.reset(); |
suntopbd | 2:4e21ea1275a1 | 421 | gap_space(gaptime); |
suntopbd | 2:4e21ea1275a1 | 422 | } |
suntopbd | 2:4e21ea1275a1 | 423 | |
suntopbd | 2:4e21ea1275a1 | 424 | |
suntopbd | 2:4e21ea1275a1 | 425 | |
suntopbd | 2:4e21ea1275a1 | 426 | void B() |
suntopbd | 2:4e21ea1275a1 | 427 | { |
suntopbd | 2:4e21ea1275a1 | 428 | timer.start(); |
suntopbd | 2:4e21ea1275a1 | 429 | while (timer.read() < speed)// time of how long character will stay |
suntopbd | 2:4e21ea1275a1 | 430 | { |
suntopbd | 2:4e21ea1275a1 | 431 | dotpointer = &Bb[0]; |
suntopbd | 2:4e21ea1275a1 | 432 | disp_page(dotpointer); |
suntopbd | 2:4e21ea1275a1 | 433 | disp_off(); |
suntopbd | 2:4e21ea1275a1 | 434 | } |
suntopbd | 2:4e21ea1275a1 | 435 | timer.reset(); |
suntopbd | 2:4e21ea1275a1 | 436 | gap_space(gaptime); |
suntopbd | 2:4e21ea1275a1 | 437 | } |
suntopbd | 2:4e21ea1275a1 | 438 | |
suntopbd | 2:4e21ea1275a1 | 439 | |
suntopbd | 2:4e21ea1275a1 | 440 | |
suntopbd | 2:4e21ea1275a1 | 441 | void C() |
suntopbd | 2:4e21ea1275a1 | 442 | { |
suntopbd | 2:4e21ea1275a1 | 443 | timer.start(); |
suntopbd | 2:4e21ea1275a1 | 444 | while (timer.read() < speed)// time of how long character will stay |
suntopbd | 2:4e21ea1275a1 | 445 | { |
suntopbd | 2:4e21ea1275a1 | 446 | dotpointer = &Cc[0]; |
suntopbd | 2:4e21ea1275a1 | 447 | disp_page(dotpointer); |
suntopbd | 2:4e21ea1275a1 | 448 | disp_off(); |
suntopbd | 2:4e21ea1275a1 | 449 | } |
suntopbd | 2:4e21ea1275a1 | 450 | timer.reset(); |
suntopbd | 2:4e21ea1275a1 | 451 | gap_space(gaptime); |
suntopbd | 2:4e21ea1275a1 | 452 | } |
suntopbd | 2:4e21ea1275a1 | 453 | |
suntopbd | 2:4e21ea1275a1 | 454 | |
suntopbd | 2:4e21ea1275a1 | 455 | void D() |
suntopbd | 2:4e21ea1275a1 | 456 | { |
suntopbd | 2:4e21ea1275a1 | 457 | timer.start(); |
suntopbd | 2:4e21ea1275a1 | 458 | while (timer.read() < speed)// time of how long character will stay |
suntopbd | 2:4e21ea1275a1 | 459 | { |
suntopbd | 2:4e21ea1275a1 | 460 | dotpointer = &Dd[0]; |
suntopbd | 2:4e21ea1275a1 | 461 | disp_page(dotpointer); |
suntopbd | 2:4e21ea1275a1 | 462 | disp_off(); |
suntopbd | 2:4e21ea1275a1 | 463 | } |
suntopbd | 2:4e21ea1275a1 | 464 | timer.reset(); |
suntopbd | 2:4e21ea1275a1 | 465 | gap_space(gaptime); |
suntopbd | 2:4e21ea1275a1 | 466 | } |
suntopbd | 2:4e21ea1275a1 | 467 | |
suntopbd | 2:4e21ea1275a1 | 468 | void E() |
suntopbd | 2:4e21ea1275a1 | 469 | { |
suntopbd | 2:4e21ea1275a1 | 470 | timer.start(); |
suntopbd | 2:4e21ea1275a1 | 471 | while (timer.read() < speed)// time of how long character will stay |
suntopbd | 2:4e21ea1275a1 | 472 | { |
suntopbd | 2:4e21ea1275a1 | 473 | dotpointer = &Ee[0]; |
suntopbd | 2:4e21ea1275a1 | 474 | disp_page(dotpointer); |
suntopbd | 2:4e21ea1275a1 | 475 | disp_off(); |
suntopbd | 2:4e21ea1275a1 | 476 | } |
suntopbd | 2:4e21ea1275a1 | 477 | timer.reset(); |
suntopbd | 2:4e21ea1275a1 | 478 | gap_space(gaptime); |
suntopbd | 2:4e21ea1275a1 | 479 | } |
suntopbd | 2:4e21ea1275a1 | 480 | |
suntopbd | 2:4e21ea1275a1 | 481 | void F() |
suntopbd | 2:4e21ea1275a1 | 482 | { |
suntopbd | 2:4e21ea1275a1 | 483 | timer.start(); |
suntopbd | 2:4e21ea1275a1 | 484 | while (timer.read() < speed)// time of how long character will stay |
suntopbd | 2:4e21ea1275a1 | 485 | { |
suntopbd | 2:4e21ea1275a1 | 486 | dotpointer = &Ff[0]; |
suntopbd | 2:4e21ea1275a1 | 487 | disp_page(dotpointer); |
suntopbd | 2:4e21ea1275a1 | 488 | disp_off(); |
suntopbd | 2:4e21ea1275a1 | 489 | } |
suntopbd | 2:4e21ea1275a1 | 490 | timer.reset(); |
suntopbd | 2:4e21ea1275a1 | 491 | gap_space(gaptime); |
suntopbd | 2:4e21ea1275a1 | 492 | } |
suntopbd | 2:4e21ea1275a1 | 493 | |
suntopbd | 2:4e21ea1275a1 | 494 | |
suntopbd | 2:4e21ea1275a1 | 495 | |
suntopbd | 2:4e21ea1275a1 | 496 | void G() |
suntopbd | 2:4e21ea1275a1 | 497 | { |
suntopbd | 2:4e21ea1275a1 | 498 | timer.start(); |
suntopbd | 2:4e21ea1275a1 | 499 | while (timer.read() < speed)// time of how long character will stay |
suntopbd | 2:4e21ea1275a1 | 500 | { |
suntopbd | 2:4e21ea1275a1 | 501 | dotpointer = &Gg[0]; |
suntopbd | 2:4e21ea1275a1 | 502 | disp_page(dotpointer); |
suntopbd | 2:4e21ea1275a1 | 503 | disp_off(); |
suntopbd | 2:4e21ea1275a1 | 504 | } |
suntopbd | 2:4e21ea1275a1 | 505 | timer.reset(); |
suntopbd | 2:4e21ea1275a1 | 506 | gap_space(gaptime); |
suntopbd | 2:4e21ea1275a1 | 507 | } |
suntopbd | 2:4e21ea1275a1 | 508 | |
suntopbd | 2:4e21ea1275a1 | 509 | |
suntopbd | 2:4e21ea1275a1 | 510 | |
suntopbd | 2:4e21ea1275a1 | 511 | void H() |
suntopbd | 2:4e21ea1275a1 | 512 | { |
suntopbd | 2:4e21ea1275a1 | 513 | timer.start(); |
suntopbd | 2:4e21ea1275a1 | 514 | while (timer.read() < speed)// time of how long character will stay |
suntopbd | 2:4e21ea1275a1 | 515 | { |
suntopbd | 2:4e21ea1275a1 | 516 | dotpointer = &Hh[0]; |
suntopbd | 2:4e21ea1275a1 | 517 | disp_page(dotpointer); |
suntopbd | 2:4e21ea1275a1 | 518 | disp_off(); |
suntopbd | 2:4e21ea1275a1 | 519 | } |
suntopbd | 2:4e21ea1275a1 | 520 | timer.reset(); |
suntopbd | 2:4e21ea1275a1 | 521 | gap_space(gaptime); |
suntopbd | 2:4e21ea1275a1 | 522 | } |
suntopbd | 2:4e21ea1275a1 | 523 | |
suntopbd | 2:4e21ea1275a1 | 524 | |
suntopbd | 2:4e21ea1275a1 | 525 | void I() |
suntopbd | 2:4e21ea1275a1 | 526 | { |
suntopbd | 2:4e21ea1275a1 | 527 | timer.start(); |
suntopbd | 2:4e21ea1275a1 | 528 | while (timer.read() < speed)// time of how long character will stay |
suntopbd | 2:4e21ea1275a1 | 529 | { |
suntopbd | 2:4e21ea1275a1 | 530 | dotpointer = &Ii[0]; |
suntopbd | 2:4e21ea1275a1 | 531 | disp_page(dotpointer); |
suntopbd | 2:4e21ea1275a1 | 532 | disp_off(); |
suntopbd | 2:4e21ea1275a1 | 533 | } |
suntopbd | 2:4e21ea1275a1 | 534 | timer.reset(); |
suntopbd | 2:4e21ea1275a1 | 535 | gap_space(gaptime); |
suntopbd | 2:4e21ea1275a1 | 536 | } |
suntopbd | 2:4e21ea1275a1 | 537 | |
suntopbd | 2:4e21ea1275a1 | 538 | void J() |
suntopbd | 2:4e21ea1275a1 | 539 | { |
suntopbd | 2:4e21ea1275a1 | 540 | timer.start(); |
suntopbd | 2:4e21ea1275a1 | 541 | while (timer.read() < speed)// time of how long character will stay |
suntopbd | 2:4e21ea1275a1 | 542 | { |
suntopbd | 2:4e21ea1275a1 | 543 | dotpointer = &Jj[0]; |
suntopbd | 2:4e21ea1275a1 | 544 | disp_page(dotpointer); |
suntopbd | 2:4e21ea1275a1 | 545 | disp_off(); |
suntopbd | 2:4e21ea1275a1 | 546 | } |
suntopbd | 2:4e21ea1275a1 | 547 | timer.reset(); |
suntopbd | 2:4e21ea1275a1 | 548 | gap_space(gaptime); |
suntopbd | 2:4e21ea1275a1 | 549 | } |
suntopbd | 2:4e21ea1275a1 | 550 | |
suntopbd | 2:4e21ea1275a1 | 551 | |
suntopbd | 2:4e21ea1275a1 | 552 | |
suntopbd | 2:4e21ea1275a1 | 553 | void K() |
suntopbd | 2:4e21ea1275a1 | 554 | { |
suntopbd | 2:4e21ea1275a1 | 555 | timer.start(); |
suntopbd | 2:4e21ea1275a1 | 556 | while (timer.read() < speed)// time of how long character will stay |
suntopbd | 2:4e21ea1275a1 | 557 | { |
suntopbd | 2:4e21ea1275a1 | 558 | dotpointer = &Kk[0]; |
suntopbd | 2:4e21ea1275a1 | 559 | disp_page(dotpointer); |
suntopbd | 2:4e21ea1275a1 | 560 | disp_off(); |
suntopbd | 2:4e21ea1275a1 | 561 | } |
suntopbd | 2:4e21ea1275a1 | 562 | timer.reset(); |
suntopbd | 2:4e21ea1275a1 | 563 | gap_space(gaptime); |
suntopbd | 2:4e21ea1275a1 | 564 | } |
suntopbd | 2:4e21ea1275a1 | 565 | |
suntopbd | 2:4e21ea1275a1 | 566 | void L() |
suntopbd | 2:4e21ea1275a1 | 567 | { |
suntopbd | 2:4e21ea1275a1 | 568 | timer.start(); |
suntopbd | 2:4e21ea1275a1 | 569 | while (timer.read() < speed)// time of how long character will stay |
suntopbd | 2:4e21ea1275a1 | 570 | { |
suntopbd | 2:4e21ea1275a1 | 571 | dotpointer = &Ll[0]; |
suntopbd | 2:4e21ea1275a1 | 572 | disp_page(dotpointer); |
suntopbd | 2:4e21ea1275a1 | 573 | disp_off(); |
suntopbd | 2:4e21ea1275a1 | 574 | } |
suntopbd | 2:4e21ea1275a1 | 575 | timer.reset(); |
suntopbd | 2:4e21ea1275a1 | 576 | gap_space(gaptime); |
suntopbd | 2:4e21ea1275a1 | 577 | } |
suntopbd | 2:4e21ea1275a1 | 578 | |
suntopbd | 2:4e21ea1275a1 | 579 | |
suntopbd | 2:4e21ea1275a1 | 580 | void M() |
suntopbd | 2:4e21ea1275a1 | 581 | { |
suntopbd | 2:4e21ea1275a1 | 582 | timer.start(); |
suntopbd | 2:4e21ea1275a1 | 583 | while (timer.read() < speed)// time of how long character will stay |
suntopbd | 2:4e21ea1275a1 | 584 | { |
suntopbd | 2:4e21ea1275a1 | 585 | dotpointer = &Mm[0]; |
suntopbd | 2:4e21ea1275a1 | 586 | disp_page(dotpointer); |
suntopbd | 2:4e21ea1275a1 | 587 | disp_off(); |
suntopbd | 2:4e21ea1275a1 | 588 | } |
suntopbd | 2:4e21ea1275a1 | 589 | timer.reset(); |
suntopbd | 2:4e21ea1275a1 | 590 | gap_space(gaptime); |
suntopbd | 2:4e21ea1275a1 | 591 | } |
suntopbd | 2:4e21ea1275a1 | 592 | |
suntopbd | 2:4e21ea1275a1 | 593 | |
suntopbd | 2:4e21ea1275a1 | 594 | |
suntopbd | 2:4e21ea1275a1 | 595 | |
suntopbd | 2:4e21ea1275a1 | 596 | |
suntopbd | 2:4e21ea1275a1 | 597 | void N() |
suntopbd | 2:4e21ea1275a1 | 598 | { |
suntopbd | 2:4e21ea1275a1 | 599 | timer.start(); |
suntopbd | 2:4e21ea1275a1 | 600 | while (timer.read() < speed)// time of how long character will stay |
suntopbd | 2:4e21ea1275a1 | 601 | { |
suntopbd | 2:4e21ea1275a1 | 602 | dotpointer = &Nn[0]; |
suntopbd | 2:4e21ea1275a1 | 603 | disp_page(dotpointer); |
suntopbd | 2:4e21ea1275a1 | 604 | disp_off(); |
suntopbd | 2:4e21ea1275a1 | 605 | } |
suntopbd | 2:4e21ea1275a1 | 606 | timer.reset(); |
suntopbd | 2:4e21ea1275a1 | 607 | gap_space(gaptime); |
suntopbd | 2:4e21ea1275a1 | 608 | } |
suntopbd | 2:4e21ea1275a1 | 609 | |
suntopbd | 2:4e21ea1275a1 | 610 | |
suntopbd | 2:4e21ea1275a1 | 611 | |
suntopbd | 2:4e21ea1275a1 | 612 | void O() |
suntopbd | 2:4e21ea1275a1 | 613 | { |
suntopbd | 2:4e21ea1275a1 | 614 | timer.start(); |
suntopbd | 2:4e21ea1275a1 | 615 | while (timer.read() < speed)// time of how long character will stay |
suntopbd | 2:4e21ea1275a1 | 616 | { |
suntopbd | 2:4e21ea1275a1 | 617 | dotpointer = &Oo[0]; |
suntopbd | 2:4e21ea1275a1 | 618 | disp_page(dotpointer); |
suntopbd | 2:4e21ea1275a1 | 619 | disp_off(); |
suntopbd | 2:4e21ea1275a1 | 620 | } |
suntopbd | 2:4e21ea1275a1 | 621 | timer.reset(); |
suntopbd | 2:4e21ea1275a1 | 622 | gap_space(gaptime); |
suntopbd | 2:4e21ea1275a1 | 623 | } |
suntopbd | 2:4e21ea1275a1 | 624 | |
suntopbd | 2:4e21ea1275a1 | 625 | |
suntopbd | 2:4e21ea1275a1 | 626 | |
suntopbd | 2:4e21ea1275a1 | 627 | void P() |
suntopbd | 2:4e21ea1275a1 | 628 | { |
suntopbd | 2:4e21ea1275a1 | 629 | timer.start(); |
suntopbd | 2:4e21ea1275a1 | 630 | while (timer.read() < speed)// time of how long character will stay |
suntopbd | 2:4e21ea1275a1 | 631 | { |
suntopbd | 2:4e21ea1275a1 | 632 | dotpointer = &Pp[0]; |
suntopbd | 2:4e21ea1275a1 | 633 | disp_page(dotpointer); |
suntopbd | 2:4e21ea1275a1 | 634 | disp_off(); |
suntopbd | 2:4e21ea1275a1 | 635 | } |
suntopbd | 2:4e21ea1275a1 | 636 | timer.reset(); |
suntopbd | 2:4e21ea1275a1 | 637 | gap_space(gaptime); |
suntopbd | 2:4e21ea1275a1 | 638 | } |
suntopbd | 2:4e21ea1275a1 | 639 | |
suntopbd | 2:4e21ea1275a1 | 640 | |
suntopbd | 2:4e21ea1275a1 | 641 | void Q() |
suntopbd | 2:4e21ea1275a1 | 642 | { |
suntopbd | 2:4e21ea1275a1 | 643 | timer.start(); |
suntopbd | 2:4e21ea1275a1 | 644 | while (timer.read() < speed)// time of how long character will stay |
suntopbd | 2:4e21ea1275a1 | 645 | { |
suntopbd | 2:4e21ea1275a1 | 646 | dotpointer = &Qq[0]; |
suntopbd | 2:4e21ea1275a1 | 647 | disp_page(dotpointer); |
suntopbd | 2:4e21ea1275a1 | 648 | disp_off(); |
suntopbd | 2:4e21ea1275a1 | 649 | } |
suntopbd | 2:4e21ea1275a1 | 650 | timer.reset(); |
suntopbd | 2:4e21ea1275a1 | 651 | gap_space(gaptime); |
suntopbd | 2:4e21ea1275a1 | 652 | } |
suntopbd | 2:4e21ea1275a1 | 653 | |
suntopbd | 2:4e21ea1275a1 | 654 | void R() |
suntopbd | 2:4e21ea1275a1 | 655 | { |
suntopbd | 2:4e21ea1275a1 | 656 | timer.start(); |
suntopbd | 2:4e21ea1275a1 | 657 | while (timer.read() < speed)// time of how long character will stay |
suntopbd | 2:4e21ea1275a1 | 658 | { |
suntopbd | 2:4e21ea1275a1 | 659 | dotpointer = &Rr[0]; |
suntopbd | 2:4e21ea1275a1 | 660 | disp_page(dotpointer); |
suntopbd | 2:4e21ea1275a1 | 661 | disp_off(); |
suntopbd | 2:4e21ea1275a1 | 662 | } |
suntopbd | 2:4e21ea1275a1 | 663 | timer.reset(); |
suntopbd | 2:4e21ea1275a1 | 664 | gap_space(gaptime); |
suntopbd | 2:4e21ea1275a1 | 665 | } |
suntopbd | 2:4e21ea1275a1 | 666 | |
suntopbd | 2:4e21ea1275a1 | 667 | void S() |
suntopbd | 2:4e21ea1275a1 | 668 | { |
suntopbd | 2:4e21ea1275a1 | 669 | timer.start(); |
suntopbd | 2:4e21ea1275a1 | 670 | while (timer.read() < speed)// time of how long character will stay |
suntopbd | 2:4e21ea1275a1 | 671 | { |
suntopbd | 2:4e21ea1275a1 | 672 | dotpointer = &Ss[0]; |
suntopbd | 2:4e21ea1275a1 | 673 | disp_page(dotpointer); |
suntopbd | 2:4e21ea1275a1 | 674 | disp_off(); |
suntopbd | 2:4e21ea1275a1 | 675 | } |
suntopbd | 2:4e21ea1275a1 | 676 | timer.reset(); |
suntopbd | 2:4e21ea1275a1 | 677 | gap_space(gaptime); |
suntopbd | 2:4e21ea1275a1 | 678 | } |
suntopbd | 2:4e21ea1275a1 | 679 | |
suntopbd | 2:4e21ea1275a1 | 680 | |
suntopbd | 2:4e21ea1275a1 | 681 | |
suntopbd | 2:4e21ea1275a1 | 682 | void T() |
suntopbd | 2:4e21ea1275a1 | 683 | { |
suntopbd | 2:4e21ea1275a1 | 684 | timer.start(); |
suntopbd | 2:4e21ea1275a1 | 685 | while (timer.read() < speed)// time of how long character will stay |
suntopbd | 2:4e21ea1275a1 | 686 | { |
suntopbd | 2:4e21ea1275a1 | 687 | dotpointer = &Tt[0]; |
suntopbd | 2:4e21ea1275a1 | 688 | disp_page(dotpointer); |
suntopbd | 2:4e21ea1275a1 | 689 | disp_off(); |
suntopbd | 2:4e21ea1275a1 | 690 | } |
suntopbd | 2:4e21ea1275a1 | 691 | timer.reset(); |
suntopbd | 2:4e21ea1275a1 | 692 | gap_space(gaptime); |
suntopbd | 2:4e21ea1275a1 | 693 | } |
suntopbd | 2:4e21ea1275a1 | 694 | |
suntopbd | 2:4e21ea1275a1 | 695 | |
suntopbd | 2:4e21ea1275a1 | 696 | |
suntopbd | 2:4e21ea1275a1 | 697 | void U() |
suntopbd | 2:4e21ea1275a1 | 698 | { |
suntopbd | 2:4e21ea1275a1 | 699 | timer.start(); |
suntopbd | 2:4e21ea1275a1 | 700 | while (timer.read() < speed)// time of how long character will stay |
suntopbd | 2:4e21ea1275a1 | 701 | { |
suntopbd | 2:4e21ea1275a1 | 702 | dotpointer = &Uu[0]; |
suntopbd | 2:4e21ea1275a1 | 703 | disp_page(dotpointer); |
suntopbd | 2:4e21ea1275a1 | 704 | disp_off(); |
suntopbd | 2:4e21ea1275a1 | 705 | } |
suntopbd | 2:4e21ea1275a1 | 706 | timer.reset(); |
suntopbd | 2:4e21ea1275a1 | 707 | gap_space(gaptime); |
suntopbd | 2:4e21ea1275a1 | 708 | } |
suntopbd | 2:4e21ea1275a1 | 709 | |
suntopbd | 2:4e21ea1275a1 | 710 | |
suntopbd | 2:4e21ea1275a1 | 711 | void V() |
suntopbd | 2:4e21ea1275a1 | 712 | { |
suntopbd | 2:4e21ea1275a1 | 713 | timer.start(); |
suntopbd | 2:4e21ea1275a1 | 714 | while (timer.read() < speed)// time of how long character will stay |
suntopbd | 2:4e21ea1275a1 | 715 | { |
suntopbd | 2:4e21ea1275a1 | 716 | dotpointer = &Vv[0]; |
suntopbd | 2:4e21ea1275a1 | 717 | disp_page(dotpointer); |
suntopbd | 2:4e21ea1275a1 | 718 | disp_off(); |
suntopbd | 2:4e21ea1275a1 | 719 | } |
suntopbd | 2:4e21ea1275a1 | 720 | timer.reset(); |
suntopbd | 2:4e21ea1275a1 | 721 | gap_space(gaptime); |
suntopbd | 2:4e21ea1275a1 | 722 | } |
suntopbd | 2:4e21ea1275a1 | 723 | |
suntopbd | 2:4e21ea1275a1 | 724 | void W() |
suntopbd | 2:4e21ea1275a1 | 725 | { |
suntopbd | 2:4e21ea1275a1 | 726 | timer.start(); |
suntopbd | 2:4e21ea1275a1 | 727 | while (timer.read() < speed)// time of how long character will stay |
suntopbd | 2:4e21ea1275a1 | 728 | { |
suntopbd | 2:4e21ea1275a1 | 729 | dotpointer = &Ww[0]; |
suntopbd | 2:4e21ea1275a1 | 730 | disp_page(dotpointer); |
suntopbd | 2:4e21ea1275a1 | 731 | disp_off(); |
suntopbd | 2:4e21ea1275a1 | 732 | } |
suntopbd | 2:4e21ea1275a1 | 733 | timer.reset(); |
suntopbd | 2:4e21ea1275a1 | 734 | gap_space(gaptime); |
suntopbd | 2:4e21ea1275a1 | 735 | } |
suntopbd | 2:4e21ea1275a1 | 736 | |
suntopbd | 2:4e21ea1275a1 | 737 | |
suntopbd | 2:4e21ea1275a1 | 738 | |
suntopbd | 2:4e21ea1275a1 | 739 | void X() |
suntopbd | 2:4e21ea1275a1 | 740 | { |
suntopbd | 2:4e21ea1275a1 | 741 | timer.start(); |
suntopbd | 2:4e21ea1275a1 | 742 | while (timer.read() < speed)// time of how long character will stay |
suntopbd | 2:4e21ea1275a1 | 743 | { |
suntopbd | 2:4e21ea1275a1 | 744 | dotpointer = &Xx[0]; |
suntopbd | 2:4e21ea1275a1 | 745 | disp_page(dotpointer); |
suntopbd | 2:4e21ea1275a1 | 746 | disp_off(); |
suntopbd | 2:4e21ea1275a1 | 747 | } |
suntopbd | 2:4e21ea1275a1 | 748 | timer.reset(); |
suntopbd | 2:4e21ea1275a1 | 749 | gap_space(gaptime); |
suntopbd | 2:4e21ea1275a1 | 750 | } |
suntopbd | 2:4e21ea1275a1 | 751 | |
suntopbd | 2:4e21ea1275a1 | 752 | void Y() |
suntopbd | 2:4e21ea1275a1 | 753 | { |
suntopbd | 2:4e21ea1275a1 | 754 | timer.start(); |
suntopbd | 2:4e21ea1275a1 | 755 | while (timer.read() < speed)// time of how long character will stay |
suntopbd | 2:4e21ea1275a1 | 756 | { |
suntopbd | 2:4e21ea1275a1 | 757 | dotpointer = &Yy[0]; |
suntopbd | 2:4e21ea1275a1 | 758 | disp_page(dotpointer); |
suntopbd | 2:4e21ea1275a1 | 759 | disp_off(); |
suntopbd | 2:4e21ea1275a1 | 760 | } |
suntopbd | 2:4e21ea1275a1 | 761 | timer.reset(); |
suntopbd | 2:4e21ea1275a1 | 762 | gap_space(gaptime); |
suntopbd | 2:4e21ea1275a1 | 763 | } |
suntopbd | 2:4e21ea1275a1 | 764 | |
suntopbd | 2:4e21ea1275a1 | 765 | |
suntopbd | 2:4e21ea1275a1 | 766 | void Z() |
suntopbd | 2:4e21ea1275a1 | 767 | { |
suntopbd | 2:4e21ea1275a1 | 768 | timer.start(); |
suntopbd | 2:4e21ea1275a1 | 769 | while (timer.read() < speed)// time of how long character will stay |
suntopbd | 2:4e21ea1275a1 | 770 | { |
suntopbd | 2:4e21ea1275a1 | 771 | dotpointer = &Zz[0]; |
suntopbd | 2:4e21ea1275a1 | 772 | disp_page(dotpointer); |
suntopbd | 2:4e21ea1275a1 | 773 | disp_off(); |
suntopbd | 2:4e21ea1275a1 | 774 | } |
suntopbd | 2:4e21ea1275a1 | 775 | timer.reset(); |
suntopbd | 2:4e21ea1275a1 | 776 | gap_space(gaptime); |
suntopbd | 2:4e21ea1275a1 | 777 | } |
suntopbd | 2:4e21ea1275a1 | 778 | |
suntopbd | 2:4e21ea1275a1 | 779 | |
suntopbd | 2:4e21ea1275a1 | 780 | |
suntopbd | 2:4e21ea1275a1 | 781 | void space() |
suntopbd | 2:4e21ea1275a1 | 782 | { |
suntopbd | 2:4e21ea1275a1 | 783 | timer.start(); |
suntopbd | 2:4e21ea1275a1 | 784 | while (timer.read() < speed)// time of how long character will stay |
suntopbd | 2:4e21ea1275a1 | 785 | { |
suntopbd | 2:4e21ea1275a1 | 786 | dotpointer = &sp[0]; |
suntopbd | 2:4e21ea1275a1 | 787 | disp_page(dotpointer); |
suntopbd | 2:4e21ea1275a1 | 788 | disp_off(); |
suntopbd | 2:4e21ea1275a1 | 789 | } |
suntopbd | 2:4e21ea1275a1 | 790 | timer.reset(); |
suntopbd | 2:4e21ea1275a1 | 791 | } |
suntopbd | 2:4e21ea1275a1 | 792 | |
suntopbd | 2:4e21ea1275a1 | 793 | void gap_space(float gt) |
suntopbd | 2:4e21ea1275a1 | 794 | |
suntopbd | 2:4e21ea1275a1 | 795 | { |
suntopbd | 2:4e21ea1275a1 | 796 | timer.start(); |
suntopbd | 2:4e21ea1275a1 | 797 | while (timer.read() < gt)// time of how long character will stay |
suntopbd | 2:4e21ea1275a1 | 798 | { |
suntopbd | 2:4e21ea1275a1 | 799 | dotpointer = &sp[0]; |
suntopbd | 2:4e21ea1275a1 | 800 | disp_page(dotpointer); |
suntopbd | 2:4e21ea1275a1 | 801 | disp_off(); |
suntopbd | 2:4e21ea1275a1 | 802 | } |
suntopbd | 2:4e21ea1275a1 | 803 | timer.reset(); |
suntopbd | 2:4e21ea1275a1 | 804 | } |
suntopbd | 2:4e21ea1275a1 | 805 | // End of Tasks // |
suntopbd | 2:4e21ea1275a1 | 806 | |
suntopbd | 2:4e21ea1275a1 | 807 | |
suntopbd | 2:4e21ea1275a1 | 808 | // Functions Body // |
suntopbd | 2:4e21ea1275a1 | 809 | void disp_off(void) |
suntopbd | 2:4e21ea1275a1 | 810 | { |
suntopbd | 2:4e21ea1275a1 | 811 | // for CC type |
suntopbd | 2:4e21ea1275a1 | 812 | C1 = 1; C2 = 1; C3 = 1; C4 = 1; C5 = 1; C6 = 1; C7 = 1; C8 = 1; |
suntopbd | 2:4e21ea1275a1 | 813 | // for CA |
suntopbd | 2:4e21ea1275a1 | 814 | //C1 = 0; C2 = 0; C3 = 0; C4 = 0; C5 = 0; C6 = 0; C7 = 0; C8 = 0; |
suntopbd | 2:4e21ea1275a1 | 815 | } |
suntopbd | 2:4e21ea1275a1 | 816 | |
suntopbd | 2:4e21ea1275a1 | 817 | void disp_line(int r,int c1,int c2,int c3,int c4,int c5,int c6,int c7,int c8) |
suntopbd | 2:4e21ea1275a1 | 818 | { |
suntopbd | 2:4e21ea1275a1 | 819 | disp_off(); |
suntopbd | 2:4e21ea1275a1 | 820 | if(r==1) {R1=1;R2=0;R3=0;R4=0;R5=0;R6=0;R7=0;R8=0;} |
suntopbd | 2:4e21ea1275a1 | 821 | if(r==2) {R1=0;R2=1;R3=0;R4=0;R5=0;R6=0;R7=0;R8=0;} |
suntopbd | 2:4e21ea1275a1 | 822 | if(r==3) {R1=0;R2=0;R3=1;R4=0;R5=0;R6=0;R7=0;R8=0;} |
suntopbd | 2:4e21ea1275a1 | 823 | if(r==4) {R1=0;R2=0;R3=0;R4=1;R5=0;R6=0;R7=0;R8=0;} |
suntopbd | 2:4e21ea1275a1 | 824 | if(r==5) {R1=0;R2=0;R3=0;R4=0;R5=1;R6=0;R7=0;R8=0;} |
suntopbd | 2:4e21ea1275a1 | 825 | if(r==6) {R1=0;R2=0;R3=0;R4=0;R5=0;R6=1;R7=0;R8=0;} |
suntopbd | 2:4e21ea1275a1 | 826 | if(r==7) {R1=0;R2=0;R3=0;R4=0;R5=0;R6=0;R7=1;R8=0;} |
suntopbd | 2:4e21ea1275a1 | 827 | if(r==8) {R1=0;R2=0;R3=0;R4=0;R5=0;R6=0;R7=0;R8=1;} |
suntopbd | 2:4e21ea1275a1 | 828 | C1=c1;C2=c2;C3=c3;C4=c4; C5=c5;C6=c6;C7=c7;C8=c8; |
suntopbd | 2:4e21ea1275a1 | 829 | } |
suntopbd | 2:4e21ea1275a1 | 830 | |
suntopbd | 2:4e21ea1275a1 | 831 | |
suntopbd | 2:4e21ea1275a1 | 832 | |
suntopbd | 2:4e21ea1275a1 | 833 | void disp_page(int *dot) |
suntopbd | 2:4e21ea1275a1 | 834 | { |
suntopbd | 2:4e21ea1275a1 | 835 | disp_line(1,*(dot+0) ,*(dot+1) ,*(dot+2) ,*(dot+3) ,*(dot+4) ,*(dot+5) ,*(dot+6) ,*(dot+7) ); |
suntopbd | 2:4e21ea1275a1 | 836 | disp_line(2,*(dot+8) ,*(dot+9) ,*(dot+10),*(dot+11),*(dot+12),*(dot+13),*(dot+14),*(dot+15)); |
suntopbd | 2:4e21ea1275a1 | 837 | disp_line(3,*(dot+16),*(dot+17),*(dot+18),*(dot+19),*(dot+20),*(dot+21),*(dot+22),*(dot+23)); |
suntopbd | 2:4e21ea1275a1 | 838 | disp_line(4,*(dot+24),*(dot+25),*(dot+26),*(dot+27),*(dot+28),*(dot+29),*(dot+30),*(dot+31)); |
suntopbd | 2:4e21ea1275a1 | 839 | disp_line(5,*(dot+32),*(dot+33),*(dot+34),*(dot+35),*(dot+36),*(dot+37),*(dot+38),*(dot+39)); |
suntopbd | 2:4e21ea1275a1 | 840 | disp_line(6,*(dot+40),*(dot+41),*(dot+42),*(dot+43),*(dot+44),*(dot+45),*(dot+46),*(dot+47)); |
suntopbd | 2:4e21ea1275a1 | 841 | disp_line(7,*(dot+48),*(dot+49),*(dot+50),*(dot+51),*(dot+52),*(dot+53),*(dot+54),*(dot+55)); |
suntopbd | 2:4e21ea1275a1 | 842 | disp_line(8,*(dot+56),*(dot+57),*(dot+58),*(dot+59),*(dot+60),*(dot+61),*(dot+62),*(dot+63)); |
suntopbd | 2:4e21ea1275a1 | 843 | |
suntopbd | 2:4e21ea1275a1 | 844 | } |
suntopbd | 2:4e21ea1275a1 | 845 | |
suntopbd | 2:4e21ea1275a1 | 846 | // End of Functions // |