Created
July 26, 2019 12:42
-
-
Save margyle/27baa858922c6cc33dd9bd6b53cc2bb6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding:utf-8 -*- | |
import epd2in7b | |
import time | |
from PIL import Image,ImageDraw,ImageFont | |
import traceback | |
try: | |
epd = epd2in7b.EPD() | |
epd.init() | |
print("Clear...") | |
epd.Clear(0xFF) | |
print("read bmp file") | |
HBlackimage = Image.open('flowerR.bmp') | |
HRedimage = Image.open('flowerB.bmp') | |
epd.display(epd.getbuffer(HRedimage),epd.getbuffer(HBlackimage)) | |
time.sleep(30) | |
epd.sleep() | |
except : | |
print ('traceback.format_exc():\n%s',traceback.format_exc()) | |
exit() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment