Created
July 26, 2019 12:42
-
-
Save margyle/27baa858922c6cc33dd9bd6b53cc2bb6 to your computer and use it in GitHub Desktop.
Revisions
-
margyle created this gist
Jul 26, 2019 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,25 @@ #!/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()