Created
November 9, 2015 06:02
-
-
Save boombatower/ccdab16926c919eee6b2 to your computer and use it in GitHub Desktop.
Cycle all leds on Logitech g710+ keyboard (demo: https://www.youtube.com/watch?v=XGil25Uhe_o)
This file contains 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
<?php | |
while (true) { | |
for ($wasd = 0; $wasd < 5; $wasd++) { | |
for ($other = 0; $other < 5; $other++) { | |
file_put_contents('/sys/bus/hid/devices/0003:046D:C24D.0002/logitech-g710/led_keys', $wasd << 4 | $other); | |
usleep(100000); | |
} | |
} | |
for ($i = 0; $i < 16; $i++) { | |
file_put_contents('/sys/bus/hid/devices/0003:046D:C24D.0002/logitech-g710/led_macro', $i); | |
usleep(100000); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment