Getting friendly device names in python

后端 未结 6 1091
夕颜
夕颜 2021-01-04 10:29

I have an 2-port signal relay connected to my computer via a USB serial interface. Using the pyserial module I can control these relays with ease. However, this is based on

6条回答
  •  借酒劲吻你
    2021-01-04 11:00

    At least for linux, you can use some dummy hacks to determine your /dev node, by inspecting for example the output of "ls /dev | grep ttyUSB" before and after you attach your device. This somehow must apply as well for the OSX case. A good idea is to inspect those commands using something like the subprocess.Popen() command. As for windows, this might be helpful.

提交回复
热议问题