Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Luxafor Python
# Luxafor via Python
# Dave Irvine @dave_irvine
# Get PyUSB from:
import usb.core
import usb.util
import sys
# find our device
dev = usb.core.find(idVendor=0x04d8, idProduct=0xf372)
# was it found?
if dev is None:
raise ValueError('Device not found')
# Linux kernel sets up a device driver for USB device, which you have
# to detach. Otherwise trying to interact with the device gives a
# 'Resource Busy' error.
except Exception, e:
dev.write(1, [0, 0])
# "red" == 82
# "green" == 71
# "blue" == 66
# "yellow" == 89
dev.write(1, [0, 82])

This comment has been minimized.

Copy link

commented Aug 25, 2015


Here are some more colors.

"magenta" == 77
"white" == 87
"off" == 79
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.