Created
October 15, 2016 19:47
-
-
Save Noxville/29b520c43248738d32c0a28b09889759 to your computer and use it in GitHub Desktop.
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
import random | |
import launchpad | |
from pygame import time | |
def main(): | |
lp = launchpad.LaunchpadPro() | |
lp.Open(0) | |
for x in xrange(9): | |
for y in xrange(9): | |
lp.LedCtrlXYByCode(x, y, 0) | |
time.wait(1000) | |
for x in xrange(8): | |
for y in xrange(1, 9): | |
lp.LedCtrlXYByCode( x, y, random.randint(1, 127)) | |
time.wait(30) | |
if __name__ == '__main__': | |
main() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment