Skip to content

Instantly share code, notes, and snippets.

@Noxville
Created October 15, 2016 19:47
Show Gist options
  • Save Noxville/29b520c43248738d32c0a28b09889759 to your computer and use it in GitHub Desktop.
Save Noxville/29b520c43248738d32c0a28b09889759 to your computer and use it in GitHub Desktop.
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