Open jpnielsen opened 3 years ago
https://docs.python.org/3/library/select.html
The "2 sec timoute wait until the infile is readable", "select.select" function seems to give the error.
"File objects on Windows are not acceptable, but sockets are. On Windows, the underlying select() function is provided by the WinSock library, and does not handle file descriptors that don’t originate from WinSock."
so far no luck writing a replacement
Ah, never tried it on Windows so I'm not sure. You could try removing the select and converting to a 100ms sleep followed by a check for infile.inWaiting()
..
-Kevin
And I moved to linux, to find this error:
python3 read_dmm.py /dev/ttyS1
Traceback (most recent call last):
File "/home/jpn/ut61_serial/read_dmm.py", line 116, in <module> main()
File "/home/jpn/ut61_serial/read_dmm.py", line 113, in main dmm.readserial()
File "/home/jpn/ut61_serial/read_dmm.py", line 88, in readserial data = leftover + d
TypeError: can only concatenate str (not "bytes") to str
Originally made in python2 i'm guessing. I will owe you many thanks, if you will update it to Python3.
I just found another way,
sigrok-cli --driver=uni-t-ut61e-ser:conn=/dev/ttyS1 -O analog --continuous
P1: 0.0 mV DC AUTO
P1: -0.2 mV DC AUTO
P1: -0.2 mV DC AUTO
I appreciate your effort, I would like to use your UNI-T software to perform calibration of my analog synthesisers. I'm not a very good programmer, so it's nice when someone has made some software allready - perhaps i can expand it with Open Sound Control myself - ultimately, I need the voltage readout from the multimeter in VCV Rack.
I get the error below, when I run "read_dmm.py" on windows 10. I have a UNI-T 61E - It works with the UNI-T software
Python 3.9.7, pyserial 3.5
./read_dmm.py COM1
Traceback (most recent call last): File "C:\msys64\home\jpn99\projects\ut61_serial\read_dmm.py", line 116, in
main()
File "C:\msys64\home\jpn99\projects\ut61_serial\read_dmm.py", line 113, in main
dmm.readserial()
File "C:\msys64\home\jpn99\projects\ut61_serial\read_dmm.py", line 75, in readserial
res = select.select([infile], [], [], 2.0)
io.UnsupportedOperation: fileno