Create a gist now

Instantly share code, notes, and snippets.

@fvdbosch /ledmatrix.py Secret
Last active Nov 10, 2016

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