Cider/drivers/helpers/send.py

19 lines
381 B
Python
Raw Normal View History

2025-01-12 03:09:25 +01:00
import hid
import time
# Vendor ID and Product ID for the iBridge device
TOUCHBAR_VENDOR_ID = 0x05ac
TOUCHBAR_PRODUCT_ID = 0x8600
device = hid.device()
try:
device.open(TOUCHBAR_VENDOR_ID, TOUCHBAR_PRODUCT_ID)
device.write([0x02, 0x01]) # Sending Data
except OSError as e:
print(f"Failed to open device: {e}")
finally:
device.close()
print("Device closed")