Esempio n. 1
0
            log = open(logdir + '%s<progress' %file, "w")
            log.write("0")
            log.close()

print (movieList)

if args.file: 
    if args.file in movieList:
        currentVideo = args.file
    else: 
        print ('%s not found' %args.file)

print("The current video is %s" %currentVideo)

# Ensure this is the correct driver for your particular screen 
epd = epd7in5_HD.EPD()

# Initialise and clear the screen 
epd.init()
epd.Clear()    

currentPosition = 0

# Open the log file and update the current position 

log = open(logdir + '%s<progress'%currentVideo)
for line in log:
    currentPosition = float(line)

if args.start:
    print('Start at frame %f' %float(args.start))
Esempio n. 2
0
import logging

##If you have a Waveshare v2 screen, try changing this to
#from waveshare_epd import epd7in5_V2 as epd7in5
from waveshare_epd import epd7in5_HD as epd7in5

import time, datetime
from PIL import Image
import traceback

logging.basicConfig(level=logging.DEBUG)

try:
    logging.info("epd7in5 Demo")

    epd = epd7in5.EPD()
    logging.info("init and Clear")
    epd.init()

    #Full screen refresh at 2 AM
    if datetime.datetime.now().minute == 0 and datetime.datetime.now(
    ).hour == 2:
        epd.Clear()

    logging.info("3.read bmp file")
    #Himage = Image.open("/home/pi/waveshare-epaper-display/screen-output.bmp")
    Himage = Image.open(sys.argv[1])
    epd.display(epd.getbuffer(Himage))

    #time.sleep(5)
    #epd.Clear()