I'm having serious issues when interfacion arduino with C code on my linux box.
the code on the linux box is like this:
write(fd, "get", 3); // tell arduino to send data
; // read 8 bytes;
end of loop
the first time i read, it returns crap.
the second time too.
the third time starts working.
I can solve it with a sleep(1) before reading, but it's not desired.
I've coded too, a loop with a select call for polling the file descriptor for incoming data, and i get a timeout for the first and second time.
I really don't know whats happening, i need help!