This thread is essentially a continuation of
this one; however, my problem now is translating BASIC code to Python.
I got ahold of a small piece of BASIC code someone was using to communicate with the device I described which connected to the serial port:
INPUT ; "Enter filename to save data- ", outfile$
OPEN outfile$ FOR OUTPUT AS #1
OPEN "COM1:9600,O,7,1" FOR RANDOM AS #2
PRINT #2, "01,TEMP?"
INPUT #2, A$, B$
INPUT #2, C$, D$, E$, F$
PRINT #1, TIME$, C$, D$, E$, F$
If it's possible to do this in just a few lines of BASIC code, it doesn't make sense to me that it should require an entire module (eg, PySerial) to do the same thing in Python. Is there a simpler way to translate this? Thanks for any input.