Hello,

i try test serial communication with very easy program. I connect Rx y Tx
pins joints for receive the data send before. Add a file for see the
connection.

The program:


#include "e_epuck_ports.h"

#include "e_init_port.h"

#include "motor_led/e_led.h"

#include "uart/e_uart_char.h"

int main(void)

{

long i;

char buffer [3] = "16";

char c1, c2;

e_init_port();

e_init_uart2();

LED0 = 1;

for(i=0;i<900000;i++){asm("nop");}

for (;;)

{

e_send_uart2_char(buffer,strlen(buffer));

while(e_uart2_sending()){LED0 = 0;}

for(i=0;i<900000;i++){asm("nop");}

LED0 = 1;

while (e_getchar_uart2(&c1)==0){LED1 = 1;}

LED1 = 0;

while (e_getchar_uart2(&c2)==0);

}

}



If the wire is connected LED0 finish off, i think the program in loop at
line

while(e_uart2_sending()){LED0 = 0;}

With the wire not connected LED0 on, off and on again; LED1always on, but is
normally without wire not can receive a data.



What can be the problem??...the program compile and load to the robot good.



Other thing, i downloaded file e-puck-snapshot.tar.tar. Inside of folder
tool i can see some programs for run in PC. For example i try use
e-puck-monitor compiling the file EpuckMonitor.cpp that have inside WinMain
in Dev-C++ but i get more errors. How i must use the programs??



Tanks in advance.

A greeting,

Juan Antonio.

Attachment: connection.GIF
Description: GIF image

_______________________________________________
E-puck-user mailing list
[email protected]
https://mail.gna.org/listinfo/e-puck-user

Reply via email to