Hi,
I'm working on a robot, with a linux computer (Ubuntu 13.10) inside and an Arduino for both IHM (lcd shield) and motor control. The Arduino is plugged on the USB port, for both communication and power.
The Arduino can work on standalone, thus as soon as it is powered up, it sends messages.
My PC program is launched when the computer starts via upstart, and is launched approximately 25 seconds after powering up. It finds the Arduino on /dev/ttyACM0, reads some bits on the serial port, and then, there is a 40 seconds lag. By this time, neither the computer recieves messages from the Arduino neither the Arduino from the computer.
- I suspect that these bits read at 25 sec are remainings of the first messages sent at powerup.
- When I get back the communication, if I read millis(), it is very low, so the Arduino has just rebooted.
- I'm sure that USB is launched, cause I can connect on a adhoc wifi network created by the computer with an USB wifi dongle far before the Arduino communication comes back.
My program on the computer is lauched just after dbus, udev and local-filesystems.
Does anyone has an idea of the origin of these 40 seconds of lag and how to get rid of them ?
Thanks in advance.