Skip to content

Instantly share code, notes, and snippets.

@aaronbassett
Created June 18, 2019 09:21
Show Gist options
  • Save aaronbassett/e2e590b5cb7e5a23834e691ec4e905ff to your computer and use it in GitHub Desktop.
Save aaronbassett/e2e590b5cb7e5a23834e691ec4e905ff to your computer and use it in GitHub Desktop.
while True:
for infile in glob.glob("pride/*.png"):
im = Image.open(infile)
pixel_grid = list(im.getdata())
for channel in range(8):
pixels = pixel_grid[channel:-1:8]
for num, pixel in enumerate(pixels):
pixel = darken_color(pixel[0], pixel[1], pixel[2], factor=0.3)
set_pixel(mote_hosts, channel + 1, num, pixel[0], pixel[1], pixel[2])
motes_show()
time.sleep(0.4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment