diff --git a/RaspberryPi_JetsonNano/python/examples/epd_1in02_test.py b/RaspberryPi_JetsonNano/python/examples/epd_1in02_test.py index 87d3f16c5..c2163163b 100644 --- a/RaspberryPi_JetsonNano/python/examples/epd_1in02_test.py +++ b/RaspberryPi_JetsonNano/python/examples/epd_1in02_test.py @@ -72,6 +72,9 @@ image_old = epd.getbuffer(time_image) num = 0 while (True): + current_time = time.time() + time.sleep(int(current_time) + 1 - current_time) + time_draw.rectangle((10, 10, 120, 50), fill = 255) time_draw.text((10, 10), time.strftime('%H:%M:%S'), font = font, fill = 0) newimage = time_image.crop([10, 10, 120, 50]) diff --git a/RaspberryPi_JetsonNano/python/examples/epd_1in54_V2_test.py b/RaspberryPi_JetsonNano/python/examples/epd_1in54_V2_test.py index 3ba558910..4321e9d34 100644 --- a/RaspberryPi_JetsonNano/python/examples/epd_1in54_V2_test.py +++ b/RaspberryPi_JetsonNano/python/examples/epd_1in54_V2_test.py @@ -71,6 +71,9 @@ time_draw = ImageDraw.Draw(time_image) num = 0 while (True): + current_time = time.time() + time.sleep(int(current_time) + 1 - current_time) + time_draw.rectangle((10, 10, 120, 50), fill = 255) time_draw.text((10, 10), time.strftime('%H:%M:%S'), font = font, fill = 0) newimage = time_image.crop([10, 10, 120, 50]) diff --git a/RaspberryPi_JetsonNano/python/examples/epd_1in54_test.py b/RaspberryPi_JetsonNano/python/examples/epd_1in54_test.py index 76efcf7ef..b8f9ecce5 100644 --- a/RaspberryPi_JetsonNano/python/examples/epd_1in54_test.py +++ b/RaspberryPi_JetsonNano/python/examples/epd_1in54_test.py @@ -68,6 +68,9 @@ time_draw = ImageDraw.Draw(time_image) num = 0 while (True): + current_time = time.time() + time.sleep(int(current_time) + 1 - current_time) + time_draw.rectangle((10, 10, 120, 50), fill = 255) time_draw.text((10, 10), time.strftime('%H:%M:%S'), font = font, fill = 0) newimage = time_image.crop([10, 10, 120, 50]) diff --git a/RaspberryPi_JetsonNano/python/examples/epd_2in13_V2_test.py b/RaspberryPi_JetsonNano/python/examples/epd_2in13_V2_test.py index 224761a22..4d4cca1da 100644 --- a/RaspberryPi_JetsonNano/python/examples/epd_2in13_V2_test.py +++ b/RaspberryPi_JetsonNano/python/examples/epd_2in13_V2_test.py @@ -72,6 +72,9 @@ epd.init(epd.PART_UPDATE) num = 0 while (True): + current_time = time.time() + time.sleep(int(current_time) + 1 - current_time) + time_draw.rectangle((120, 80, 220, 105), fill = 255) time_draw.text((120, 80), time.strftime('%H:%M:%S'), font = font24, fill = 0) epd.displayPartial(epd.getbuffer(time_image)) diff --git a/RaspberryPi_JetsonNano/python/examples/epd_2in13_V3_test.py b/RaspberryPi_JetsonNano/python/examples/epd_2in13_V3_test.py index b9c9a96f7..7648e65dd 100644 --- a/RaspberryPi_JetsonNano/python/examples/epd_2in13_V3_test.py +++ b/RaspberryPi_JetsonNano/python/examples/epd_2in13_V3_test.py @@ -70,6 +70,9 @@ epd.displayPartBaseImage(epd.getbuffer(time_image)) num = 0 while (True): + current_time = time.time() + time.sleep(int(current_time) + 1 - current_time) + time_draw.rectangle((120, 80, 220, 105), fill = 255) time_draw.text((120, 80), time.strftime('%H:%M:%S'), font = font24, fill = 0) epd.displayPartial(epd.getbuffer(time_image)) diff --git a/RaspberryPi_JetsonNano/python/examples/epd_2in13_V4_test.py b/RaspberryPi_JetsonNano/python/examples/epd_2in13_V4_test.py index 7fe426754..5557ec53f 100644 --- a/RaspberryPi_JetsonNano/python/examples/epd_2in13_V4_test.py +++ b/RaspberryPi_JetsonNano/python/examples/epd_2in13_V4_test.py @@ -110,6 +110,9 @@ epd.displayPartBaseImage(epd.getbuffer(time_image)) num = 0 while (True): + current_time = time.time() + time.sleep(int(current_time) + 1 - current_time) + time_draw.rectangle((120, 80, 220, 105), fill = 255) time_draw.text((120, 80), time.strftime('%H:%M:%S'), font = font24, fill = 0) epd.displayPartial(epd.getbuffer(time_image)) diff --git a/RaspberryPi_JetsonNano/python/examples/epd_2in13_test.py b/RaspberryPi_JetsonNano/python/examples/epd_2in13_test.py index f72cf6de2..43b7cabc8 100644 --- a/RaspberryPi_JetsonNano/python/examples/epd_2in13_test.py +++ b/RaspberryPi_JetsonNano/python/examples/epd_2in13_test.py @@ -70,6 +70,9 @@ time_draw = ImageDraw.Draw(time_image) num = 0 while (True): + current_time = time.time() + time.sleep(int(current_time) + 1 - current_time) + time_draw.rectangle((120, 80, 220, 105), fill = 255) time_draw.text((120, 80), time.strftime('%H:%M:%S'), font = font24, fill = 0) epd.display(epd.getbuffer(time_image)) diff --git a/RaspberryPi_JetsonNano/python/examples/epd_2in13d_test.py b/RaspberryPi_JetsonNano/python/examples/epd_2in13d_test.py index 62c3ca483..c7e89de40 100644 --- a/RaspberryPi_JetsonNano/python/examples/epd_2in13d_test.py +++ b/RaspberryPi_JetsonNano/python/examples/epd_2in13d_test.py @@ -65,6 +65,8 @@ # time_draw = ImageDraw.Draw(time_image) # num = 0 # while (True): + # current_time = time.time() + # time.sleep(int(current_time) + 1 - current_time) # time_draw.rectangle((10, 10, 120, 50), fill = 255) # time_draw.text((10, 10), time.strftime('%H:%M:%S'), font = font24, fill = 0) # newimage = time_image.crop([10, 10, 120, 50]) diff --git a/RaspberryPi_JetsonNano/python/examples/epd_2in66_test.py b/RaspberryPi_JetsonNano/python/examples/epd_2in66_test.py index 982cb64ec..03c451020 100644 --- a/RaspberryPi_JetsonNano/python/examples/epd_2in66_test.py +++ b/RaspberryPi_JetsonNano/python/examples/epd_2in66_test.py @@ -81,6 +81,9 @@ time_draw = ImageDraw.Draw(Limage) num = 0 while (True): + current_time = time.time() + time.sleep(int(current_time) + 1 - current_time) + time_draw.rectangle((10, 210, 120, 250), fill = 255) time_draw.text((10, 210), time.strftime('%H:%M:%S'), font = font24, fill = 0) epd.display(epd.getbuffer(Limage)) diff --git a/RaspberryPi_JetsonNano/python/examples/epd_2in7_V2_test.py b/RaspberryPi_JetsonNano/python/examples/epd_2in7_V2_test.py index 818494774..7e60cb2e5 100644 --- a/RaspberryPi_JetsonNano/python/examples/epd_2in7_V2_test.py +++ b/RaspberryPi_JetsonNano/python/examples/epd_2in7_V2_test.py @@ -93,6 +93,9 @@ # draw = ImageDraw.Draw(time_image) num = 0 while (True): + current_time = time.time() + time.sleep(int(current_time) + 1 - current_time) + draw.rectangle((10, 110, 120, 150), fill = 255) draw.text((10, 110), time.strftime('%H:%M:%S'), font = font24, fill = 0) newimage = Himage.crop([10, 110, 120, 150]) diff --git a/RaspberryPi_JetsonNano/python/examples/epd_2in9_V2_test.py b/RaspberryPi_JetsonNano/python/examples/epd_2in9_V2_test.py index 2d94a0116..b3eb6cdcc 100644 --- a/RaspberryPi_JetsonNano/python/examples/epd_2in9_V2_test.py +++ b/RaspberryPi_JetsonNano/python/examples/epd_2in9_V2_test.py @@ -83,6 +83,9 @@ epd.display_Base(epd.getbuffer(time_image)) num = 0 while (True): + current_time = time.time() + time.sleep(int(current_time) + 1 - current_time) + time_draw.rectangle((10, 10, 120, 50), fill = 255) time_draw.text((10, 10), time.strftime('%H:%M:%S'), font = font24, fill = 0) newimage = time_image.crop([10, 10, 120, 50]) diff --git a/RaspberryPi_JetsonNano/python/examples/epd_2in9_test.py b/RaspberryPi_JetsonNano/python/examples/epd_2in9_test.py index 6ac61150c..3de945888 100644 --- a/RaspberryPi_JetsonNano/python/examples/epd_2in9_test.py +++ b/RaspberryPi_JetsonNano/python/examples/epd_2in9_test.py @@ -82,6 +82,9 @@ time_draw = ImageDraw.Draw(time_image) num = 0 while (True): + current_time = time.time() + time.sleep(int(current_time) + 1 - current_time) + time_draw.rectangle((10, 10, 120, 50), fill = 255) time_draw.text((10, 10), time.strftime('%H:%M:%S'), font = font24, fill = 0) newimage = time_image.crop([10, 10, 120, 50]) diff --git a/RaspberryPi_JetsonNano/python/examples/epd_2in9d_test.py b/RaspberryPi_JetsonNano/python/examples/epd_2in9d_test.py index 8a0c92c71..1be61eff6 100644 --- a/RaspberryPi_JetsonNano/python/examples/epd_2in9d_test.py +++ b/RaspberryPi_JetsonNano/python/examples/epd_2in9d_test.py @@ -83,6 +83,9 @@ time_draw = ImageDraw.Draw(time_image) num = 0 while (True): + current_time = time.time() + time.sleep(int(current_time) + 1 - current_time) + time_draw.rectangle((10, 10, 120, 50), fill = 255) time_draw.text((10, 10), time.strftime('%H:%M:%S'), font = font24, fill = 0) newimage = time_image.crop([10, 10, 120, 50]) diff --git a/RaspberryPi_JetsonNano/python/examples/epd_3in7_test.py b/RaspberryPi_JetsonNano/python/examples/epd_3in7_test.py index 2920c2e96..f56d94d4c 100644 --- a/RaspberryPi_JetsonNano/python/examples/epd_3in7_test.py +++ b/RaspberryPi_JetsonNano/python/examples/epd_3in7_test.py @@ -91,6 +91,9 @@ time_draw = ImageDraw.Draw(time_image) num = 0 while (True): + current_time = time.time() + time.sleep(int(current_time) + 1 - current_time) + time_draw.rectangle((10, 10, 120, 50), fill = 255) time_draw.text((10, 10), time.strftime('%H:%M:%S'), font = font24, fill = 0) epd.display_1Gray(epd.getbuffer(time_image))