dfi-led-matrix/original_ctrl_sw/printtext_dfi/printtext.py

43 lines
1.5 KiB
Python

#!/usr/bin/env python3
import time
from FlipdotSender import FlipdotSender
import time
import sys
from random import randint
flipdot = FlipdotSender("localhost", 2323,(160,48),40)
#text=sys.argv[1]
if len(sys.argv)>1:
while(True):
flipdot.send_img_from_filename(sys.argv[1],0)
time.sleep(1)
#flipdot.send_text(text)
#flipdot.send_marquee(text)
while(True):
flipdot.send_img_from_filename("troll.png",randint(0,1)==0)
time.sleep(randint(5,20))
flipdot.send_img_from_filename("kirbyboss.png",randint(0,1)==0)
time.sleep(randint(5,20))
flipdot.send_img_from_filename("kirby.png",randint(0,1)==0)
time.sleep(randint(5,20))
flipdot.send_img_from_filename("pokemon_wildpidgey.png",randint(0,1)==0)
time.sleep(randint(5,20))
flipdot.send_img_from_filename("tetris.png",randint(0,1)==0)
time.sleep(randint(5,20))
flipdot.send_img_from_filename("zelda.png",randint(0,1)==0)
time.sleep(randint(5,20))
flipdot.send_img_from_filename("mario.png",randint(0,1)==0)
time.sleep(randint(5,20))
flipdot.send_img_from_filename("chaoswest.png",randint(0,1)==0)
time.sleep(randint(5,20))
flipdot.send_img_from_filename("ctdo_logo.png",randint(0,1)==0)
time.sleep(randint(5,20))
flipdot.send_img_from_filename("tuwat.png",randint(0,1)==0)
time.sleep(randint(5,20))
flipdot.send_img_from_filename("nyancat.png",randint(0,1)==0)
time.sleep(randint(5,20))
flipdot.send_img_from_filename("Spaceinvaders.png",randint(0,1)==0)
time.sleep(randint(5,20))