change to lib version2
This commit is contained in:
parent
3bd69e5e13
commit
665b19c106
@ -8,7 +8,7 @@ if os.path.exists(libdir):
|
|||||||
sys.path.append(libdir)
|
sys.path.append(libdir)
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
from waveshare_epd import epd2in13d
|
from waveshare_epd import epd2in13_V2
|
||||||
import time
|
import time
|
||||||
from PIL import Image,ImageDraw,ImageFont
|
from PIL import Image,ImageDraw,ImageFont
|
||||||
import traceback
|
import traceback
|
||||||
@ -32,10 +32,10 @@ pw = "phio6yiR9ohs1veeghu4WaeGhaiRi8he4EiWasheev4faeku8tohdiuthah7zahP"
|
|||||||
client_id = "solarmonitor"
|
client_id = "solarmonitor"
|
||||||
|
|
||||||
try:
|
try:
|
||||||
epd = epd2in13d.EPD()
|
epd = epd2in13_V2.EPD()
|
||||||
logging.debug("init and Clear")
|
logging.debug("init and Clear")
|
||||||
epd.init()
|
epd.init(epd.FULL_UPDATE)
|
||||||
epd.Clear()
|
epd.Clear(0xFF)
|
||||||
#time.sleep(1)
|
#time.sleep(1)
|
||||||
|
|
||||||
except IOError as e:
|
except IOError as e:
|
||||||
@ -44,7 +44,7 @@ except IOError as e:
|
|||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
logging.info("ctrl + c:")
|
logging.info("ctrl + c:")
|
||||||
epd.Clear()
|
epd.Clear()
|
||||||
epd2in13d.epdconfig.module_exit()
|
epd2in13_V2.epdconfig.module_exit()
|
||||||
exit()
|
exit()
|
||||||
|
|
||||||
def on_connect(client, userdata, flags, rc):
|
def on_connect(client, userdata, flags, rc):
|
||||||
|
Loading…
Reference in New Issue
Block a user