This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# To run with pyusb debugging: | |
# | |
# PYUSB_DEBUG=debug python relay.py | |
# | |
# Grab the vendor and product codes from syslog when plugging in the relay: | |
# | |
# usb 3-1: New USB device found, idVendor=1a86, idProduct=7523 | |
# | |
import time | |
import usb.core |