From 1cc8988612b93e1e893b00243a041fac00d619e5 Mon Sep 17 00:00:00 2001 From: Sean Corrigan Date: Fri, 13 Nov 2020 19:01:00 -0500 Subject: [PATCH] fix error message --- display.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/display.py b/display.py index a76cbc8..f69ba57 100644 --- a/display.py +++ b/display.py @@ -17,9 +17,11 @@ def sendUpdate(message): # message = "testing 123 what is going\n on ahbfuasdfhkgasyudgfuasykgdf" - while True: - font15 = ImageFont.truetype('wqy-microhei.ttc', 20) - draw.text((3, 3), '{}'.format(message), font = font15, fill = 0) - epd.display(epd.getbuffer(image)) - time.sleep(20) + + font15 = ImageFont.truetype('wqy-microhei.ttc', 20) + draw.text((3, 3), '{}'.format(message), font = font15, fill = 0) + epd.display(epd.getbuffer(image)) + time.sleep(20) +if __name__ == "__main__": + sendUpdate('Please run this program via\na callable function\nin your own program')