diff --git a/arduinoToRpi.c b/arduinoToRpi.c new file mode 100644 index 0000000..225fc87 --- /dev/null +++ b/arduinoToRpi.c @@ -0,0 +1,56 @@ +#include // for the input/output register +#include +#include +#include +#include +#include +#include + +#define PRESCALER 1024 +#define TIME_SLOT 20 +#define NB_TICK 113 +#define BAUDRATE 103 + +void send_serial(unsigned char c) +{ + loop_until_bit_is_set(UCSR0A, UDRE0); + UDR0 = c; +} + +void send_msg(void){ + char msg[] = "Bonjour\r\n"; + while(1){ //nécessaire pour eviter d'executer la tache une seule fois + int i=0; + for(i=0; i