Line 228... |
Line 228... |
228 |
{ |
228 |
{ |
229 |
switch (Serial.read()) |
229 |
switch (Serial.read()) |
230 |
{ |
230 |
{ |
231 |
case 'i': // inicializace |
231 |
case 'i': // inicializace |
232 |
inicializace (); |
232 |
inicializace (); |
233 |
telemetrie (); |
- |
|
234 |
break; |
233 |
break; |
235 |
case 'm': |
234 |
case 'm': |
236 |
motor (-1); |
235 |
motor (-1); |
237 |
telemetrie (); |
- |
|
238 |
break; |
236 |
break; |
239 |
case 'M': |
237 |
case 'M': |
240 |
motor (1); // vysunuto |
238 |
motor (1); // vysunuto |
241 |
telemetrie (); |
- |
|
242 |
break; |
239 |
break; |
243 |
case 'A': |
240 |
case 'A': |
244 |
digitalWrite(FW1, HIGH); |
241 |
digitalWrite(FW1, HIGH); |
245 |
telemetrie (); |
- |
|
246 |
break; |
242 |
break; |
247 |
case 'a': |
243 |
case 'a': |
248 |
digitalWrite(FW1, LOW); |
244 |
digitalWrite(FW1, LOW); |
249 |
telemetrie (); |
- |
|
250 |
break; |
245 |
break; |
251 |
case 'B': |
246 |
case 'B': |
252 |
digitalWrite(FW2, HIGH); |
247 |
digitalWrite(FW2, HIGH); |
253 |
telemetrie (); |
- |
|
254 |
break; |
248 |
break; |
255 |
case 'b': |
249 |
case 'b': |
256 |
digitalWrite(FW2, LOW); |
250 |
digitalWrite(FW2, LOW); |
257 |
telemetrie (); |
- |
|
258 |
break; |
251 |
break; |
259 |
case 'C': |
252 |
case 'C': |
260 |
digitalWrite(FW3, HIGH); |
253 |
digitalWrite(FW3, HIGH); |
261 |
telemetrie (); |
- |
|
262 |
break; |
254 |
break; |
263 |
case 'c': |
255 |
case 'c': |
264 |
digitalWrite(FW3, LOW); |
256 |
digitalWrite(FW3, LOW); |
265 |
telemetrie (); |
- |
|
266 |
break; |
- |
|
267 |
default: |
- |
|
268 |
break; |
257 |
break; |
269 |
} |
258 |
} |
- |
|
259 |
telemetrie (); |
270 |
Serial.flush (); |
260 |
Serial.flush (); |
271 |
// /for (serInIndx = 100; serInIndx > 0; serInIndx--) |
261 |
// /for (serInIndx = 100; serInIndx > 0; serInIndx--) |
272 |
// serInString[serInIndx] = ' '; |
262 |
// serInString[serInIndx] = ' '; |
273 |
} |
263 |
} |
274 |
|
264 |
|