Hi,
I am beginner user of e-puck. In my project I have to connect RFID reader with
e-puck by using RS232.
For that I have to use both of the UARTs (one to connect RFID with with e-puck.
second to interface with PC's minicom via bluetooth).
For now just for testing purpose, I am using only one of the uarts and
transmit/receive data using minicom. (example code given in e_uart_char.h)
UART1 and UART2 both work fine when I use only one of them in code. But when I
try to use both of the UARTs in code, it does not work.
It is now almost 3 days I am trying to solve it but no success. Thank you so
much for the help in advance!
My code is:
int main(void)
{
char car;
e_init_port();
e_init_uart1();
e_init_uart2();
while(1)
{
e_send_uart2_char("Give a character:\r\n", 19); //it even does
not display this line
// do nothing while the text is not sent and while nothing is
comming from the user
while(e_uart2_sending() || !e_ischar_uart2()) {}
e_getchar_uart2(&car); // read the character
entered...
e_send_uart2_char("You have wrote: ", 16);
e_send_uart2_char(&car, 1); //... and resend him to
uart.
e_send_uart2_char("\r\n\r\n",4);
}
}
_______________________________________________
E-puck-user mailing list
E-puck-user@gna.org
https://mail.gna.org/listinfo/e-puck-user