Skip to content

Instantly share code, notes, and snippets.

@fvdbosch
Last active November 10, 2016 13:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fvdbosch/51f59fba51453ffcbfaca570386b9152 to your computer and use it in GitHub Desktop.
Save fvdbosch/51f59fba51453ffcbfaca570386b9152 to your computer and use it in GitHub Desktop.
Displaying pixel art on the Adafruit RGB Matrix using a Raspberry Pi Zero
#!/usr/bin/env python
# RGB Matrix Library: https://github.com/hzeller/rpi-rgb-led-matrix
import os
from time import sleep
directory = "/home/pi/rpi-rgb-led-matrix/examples-api-use/"
while(1):
for filename in os.listdir(directory + "images"):
os.system("sudo " + directory + "demo -D1 -m 0 --led-gpio-mapping=adafruit-hat-pwm " + directory + "images/" + filename + " &")
sleep(5)
os.system("sudo killall demo")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment