Skip to content

Instantly share code, notes, and snippets.

View MartinEnders's full-sized avatar
🤪

Dr. Martin Enders MartinEnders

🤪
View GitHub Profile
@MartinEnders
MartinEnders / hid_relay_test.py
Last active December 18, 2017 12:07 — forked from anonymous/hid_relay_test.py
Controlling USB-HIT Relays connected to different USB-Ports from Linux (Debian) with Python 3
from __future__ import print_function
import hid
import time
# Ziel des Skripts: Ansteuern von USB-Relais via HID
# Durch die Identifikation der HID-Devices via device_path
# koennen z.B. zwei Relais an zwei USB-Anschluessen angesteuert werden.
# Problem: Nach an- und abstecken der Relais bekommen die Relais neue
# Pfade zugewiesen. Eine eindeutige Identifikation scheint nicht mgl. zu sein.