So Tired !_! 逆水行舟, 不进则退!

21Mar/19

ubuntu下用python控制usbrelay设备

安装:
https://github.com/walac/pyusb

然后参考网友提供的图片内容:

0x21,0x09,0x300,0x0000,[0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00]

中括号里前2个是主要控制参数,

第1个参数, 0xff是打开1个开关,0xfe是打开所有开关,0xfd是关闭1个开关,0xfc是关闭所有开关

第2个参数, 0x01对应第几个开关,当第1个参数是0xfe和0xfc时该参数无效

 

usbrelay-python

anyShare分享到:
Filed under: Linux, Python Comments Off
Comments (0) Trackbacks (0)

Sorry, the comment form is closed at this time.

Trackbacks are disabled.

site