I want to send/receive data between PC and Pi-Zero over USB port near PWR port.
I followed the instructions here https://www.tal.org/tutorials/raspberry-pi-zero-usb-serial-console But I don't enable
Pi appears as a serial device on Device Manager in Windows with port
. I wrote two scripts that will run on each side. On pc I have,
port = serial.Serial(port='COM13', baudrate=115200,) while True: num = port.write('hi\n') print num time.sleep(1)
This script successfully opens COM port and prints the number of bytes which is 3 bytes in this case.
On Pi zero,
appears as a serial device. And the code,
port = serial.Serial(port='/dev/ttyAMA0', baudrate=115200,) rec = port.read(3) print rec
which opens the port successfully but outputs nothing, gets stuck in
port.read instruction. What am I missing here?