I have made a program which give instruction to a motor module. I have successfully send instruction to him, asking it to make a rotation back and forth, but I can't get back the feedback result.
I sent signal throught the GPIO14 (tx) and GPIO15 (rx) to get the result. So I'm writting data on port /dev/ttyAMA0, and reading result into it too.
On arduino, there is led for tx/rx signal, which make the debug more confortable. Here, since my motor work, I presume it get the signal. But i'm trying to read on /dev/ttyAMA0 again, and I don't get any result.
This is a half-duplex communication, so there is a control pin who decide which one can talk. The fact that I get nothing when I send data to the motor, then I don't know if it is an hardware problem, or if I need to ask feedback to the motor. In the doc they say when you give command to the motor, it return a feedback status packet. The fact is, I don't know when the data is transmitted.
So my question is, is there a rapid way to test on Raspi if tx pin send data and rx pin get data. Or if the only way is to place debug led on the circuit. And when you read into /dev/ttyAMA0, if you need to wait for the data, or it acts like a buffer?
/dev/ttyAMA0
as the UART, because otherwise it is the bluetooth module and there may be some erroneous conclusions here. – goldilocks Sep 16 '16 at 16:40