diff options
| author | root <D Delmar Davis feurig@fromhell.com> | 2024-08-30 16:37:02 -0700 |
|---|---|---|
| committer | root <D Delmar Davis feurig@fromhell.com> | 2024-08-30 16:37:02 -0700 |
| commit | 867eecf4a0690d48d51865a44488f06b66c6ecaa (patch) | |
| tree | 65c45e438d3def2dd7d8d1303d0332205ff01c26 /bin | |
| parent | 7e22cfff790aec58f738104550d39a42ccfd273c (diff) | |
working clock
Diffstat (limited to 'bin')
| -rw-r--r-- | bin/analogclock.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/bin/analogclock.py b/bin/analogclock.py index 8b0cfd7..c7ab289 100644 --- a/bin/analogclock.py +++ b/bin/analogclock.py @@ -25,7 +25,7 @@ display = st7789.ST7789( height=240, x_offset=0, y_offset=80, - + rotation=180 ) backlight = digitalio.DigitalInOut(board.D22) @@ -80,10 +80,15 @@ def draw_clock(t: datetime): draw.line([center,center,center+hx,center+hy], fill=255, width=0) -while true: +while True: try: thetime=datetime.now() draw_clock(thetime) + display.image(image) + #display.show() + time.sleep(0.1) + + except Exception as e: print(e) |
