pyserial newbie questions
Gilles
gilles.celli at ecgs.lu
Thu Apr 10 04:08:38 EDT 2003
Hello folks,
Since I am very new to Python I have the following question:
I try to write a program in Python (on RHat 8.0 Linux) with the
"pyserial" module which communicates to a device via RS232 serial cable.
The program should do:
1. Set Com port to 300,n,8,1
2. Send 20 NULL characters Chr(0)
3. Wait 10 ms ( may vary in your case)
4. Send a string "HELLO"
5. Wait to receive ³READY² string from device
6. If above string OK SEND ³START²
I figured out how to set the port, send the 20 NULL characters :)
But I have no idea how to "wait for 10ms", send the HELLO string and
read the READY string...
Anyone has a clue or source code sample ?
Thanks a lot.
Gilles
More information about the Python-list
mailing list