#include <p30f6014A.h>
#include <string.h>
#include <ctype.h>
#include <stdio.h>
#include <motor_led/e_epuck_ports.h>
#include <motor_led/e_init_port.h>
#include <motor_led/advance_one_timer/e_led.h>
#include <motor_led/advance_one_timer/e_motors.h>
#include <uart/e_uart_char.h>
#include <a_d/advance_ad_scan/e_ad_conv.h>
#include <a_d/advance_ad_scan/e_acc.h>
#include <a_d/advance_ad_scan/e_prox.h>
#include <a_d/advance_ad_scan/e_micro.h>
#include <motor_led/advance_one_timer/e_agenda.h>
#include <camera/fast_2_timer/e_po3030k.h>
#include <codec/e_sound.h>
#include <motor_led/advance_one_timer/e_remote_control.h>
The sercom works as folowing. Into the infinite loop we look if something is coming from the uart1. If a good command is coming we branch it to the correct code and we send back at first the comand followed by the result (if there is one).
For exemple if the "a + return" is coming, we return first the command: "a" and then the three values of the accelerometer separated by a coma, the returned value will be for exemple: "a,2001,2300,1890+return"
Another exemple is controling the motors. In this case we receive for exemple "d,200,-200+return". Then we put the motor speed left on 200 and motor speed right on -200 and send back "d+return".
1.5.4