Commit 907e2ddf2b543041db0c3c726803d35d409f164d
1 parent
0ebed0a2
MAJ Fichier
Showing
1 changed file
with
7 additions
and
15 deletions
Show diff stats
arduinoToRpi.c
@@ -17,17 +17,6 @@ void send_serial(unsigned char c) | @@ -17,17 +17,6 @@ void send_serial(unsigned char c) | ||
17 | UDR0 = c; | 17 | UDR0 = c; |
18 | } | 18 | } |
19 | 19 | ||
20 | -void send_msg(void){ | ||
21 | - char msg[] = "Bonjour\r\n"; | ||
22 | - while(1){ //nécessaire pour eviter d'executer la tache une seule fois | ||
23 | - int i=0; | ||
24 | - for(i=0; i<strlen(msg); i++){ | ||
25 | - send_serial(msg[i]); | ||
26 | - _delay_ms(100); | ||
27 | - | ||
28 | -} | ||
29 | - | ||
30 | - | ||
31 | void init_serial(void) | 20 | void init_serial(void) |
32 | { | 21 | { |
33 | /* ACHTUNG : we suppose UBRR value < 0xff */ | 22 | /* ACHTUNG : we suppose UBRR value < 0xff */ |
@@ -50,7 +39,10 @@ void init_serial(void) | @@ -50,7 +39,10 @@ void init_serial(void) | ||
50 | int main(void) | 39 | int main(void) |
51 | { | 40 | { |
52 | init_serial(); | 41 | init_serial(); |
53 | - while(1){ | ||
54 | - send_serial('A'); | ||
55 | - sleep(3000)} | ||
56 | -} | ||
57 | \ No newline at end of file | 42 | \ No newline at end of file |
43 | + while(1) | ||
44 | + { | ||
45 | + send_serial('A'); | ||
46 | + _delay_ms(3000); | ||
47 | + } | ||
48 | + return 0; | ||
49 | +} |