Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
111 | mikeljo | 1 | |
2 | #include <avr/io.h> |
||
3 | #include <inttypes.h> |
||
4 | #include <stdlib.h> |
||
5 | #include <avr/pgmspace.h> |
||
6 | |||
7 | #include "main.h" |
||
8 | #include "motortest.h" |
||
9 | #include "lcd.h" |
||
10 | #include "base64.h" |
||
11 | |||
12 | void motor_test(void) |
||
13 | { |
||
14 | lcd_cls(); |
||
15 | |||
16 | while (key != 0x00); |
||
17 | |||
18 | lcd_printp(PSTR("Taste drücken\r\n"),0); |
||
19 | |||
20 | while (key == 0x00); |
||
21 | if (key == 0x08) // nur, wenn die Bestätigungstaste gedrückt wird |
||
22 | { |
||
23 | p_buffer[0] = '#'; // Motoren einschalten |
||
24 | p_buffer[1] = 'a'; |
||
25 | p_buffer[2] = 't'; |
||
26 | p_buffer[3] = 10; |
||
27 | p_buffer[4] = 10; |
||
28 | p_buffer[5] = 10; |
||
29 | p_buffer[6] = 10; |
||
30 | p_buffer[7] = 0; |
||
31 | p_buffer[8] = 0; |
||
32 | |||
33 | base64_send(9); |
||
34 | } |
||
35 | |||
36 | while (key != 0x00); |
||
37 | while (key == 0x00); |
||
38 | |||
39 | p_buffer[0] = '#'; // Motoren ausschalten |
||
40 | p_buffer[1] = 'a'; |
||
41 | p_buffer[2] = 't'; |
||
42 | p_buffer[3] = 0; |
||
43 | p_buffer[4] = 0; |
||
44 | p_buffer[5] = 0; |
||
45 | p_buffer[6] = 0; |
||
46 | p_buffer[7] = 0; |
||
47 | p_buffer[8] = 0; |
||
48 | |||
49 | base64_send(9); |
||
50 | |||
51 | |||
52 | } |