Have trouble reading from the signal from /dev/ttyAMA0
Hi, I am following the instruction here,
I loaded oga's firmware. (it is confirmed because the "#M00" - "#M10" commands are working)
From raspberry pi's python console (With sudo), I will the following
SENSOR_PIN = 6
RAPIRO_TTY = '/dev/ttyAMA0'
rapiro = serial.Serial(RAPIRO_TTY, 57600, timeout = 10)
value = 0
# version check
version = ""
version += rapiro.read(1)
it prints nothing.
If I run a "$ sudo last -f /dev/ttyAMA0" in another terminal,
I got a error message right after the rapiro.write("#V")
last: seek failed!
Trying shutting down the Pi and using Usb to Arduino connection, I am able to read with "#A6" command. Hence it seems to be a reading problem between the Pi and Arduino.
After some googling, I've figured it out. Here is the step I missed out before python can read from the ttyAMA0