I would like to communicate from my Pololu 3pi robot to a Raspberry Pi via the USB-to-TTL-Serial adapter.
When plugging both, it correctly appear /dev/ttyACM0 and /dev/ttyACM1 serial ports on my Raspberry Pi. But trying to receive data on my Raspberry, communication does not seem to work.
Serial lines have been initialized to 115200 bauds on both 3pi and Raspberry software interfaces, then communication was expected on /dev/ttyACM1 ports.
So, is it correct to use standards “serial_send” function, or should I add something ?
To which “USB-to-TTL” serial adapter are you referring? A link to the product page would be useful.
Exactly how do you have it connected to the 3Pi?
What program is running on the 3Pi?
What software are you using on the Raspberry Pi to communicate with the adapter?
Thanks for your first answer.
I try to use Pololu AVR programmer PGM03A as usb-to-ttl-serial adapter.
In a very first version of our project, we’ve decided to directly connect our 3pi PD0 and PD1 pins to Raspberry Rx and TX. But it seems to happen synchronization issues. So, we’ve decided to try using the adapter for more reliable communication.
3pi running program is a simple serial_send_blocking of a 64 bytes message.
For Raspberry part, we are using wiringPi serial methods, which consist in a kind of standard posix read() method for /dev/ttyACM1 descriptor.
Sorry but this still isn’t clear. There are two ways to connect the serial pins and only one works. PortD, pin 0 on the 3Pi is receive and should be connected to TX on the RPi (PGM03a) serial adapter. You must also have a common ground connection.
Could you post the 3Pi program using code tags?
I would use a terminal program on the RPi to test the communication before running other software.