I am Maurice from Belgium. I try to interface my Raspberry Pi with a Picaxe board through a FTDI USB cable.
The test program is simple : "Light up LED on C.6 (picaxe port) when letter "O" received"
So I made the following script in Python :
- Code: Select all
import serial
test=serial.Serial("/dev/ttyUSB0",9600)
test.open()
test.write("O")
test.close()
Not working !
But this works perfectly :
- Code: Select all
import serial
test=serial.Serial("/dev/ttyUSB0",19200)
test=serial.Serial("/dev/ttyUSB0",9600)
test.open()
test.write("O")
test.close()
I double checked all the RS-232 params (baudrate, bitesize, parity,stopbit) to match them to the one of Picaxe.
So now I have a "solution" but I want a proper one with only one line to connect with 9600 baudrate (First code).
So could someone help ? I don't find any forum or help (except FAQ) on python-serial website.
Thanks in advance,
Maurice