09_localTimeClock.py 445 B

1234567891011
  1. #!/usr/bin/env python
  2. #version : 2023.04.04
  3. #language : en
  4. import time
  5. from maix import camera, display, image
  6. image.load_freetype("/root/preset/fonts/CascadiaCodePL-Italic.ttf")
  7. while True:
  8. hello_img = image.new(size = (240, 240), color = (0, 0, 0), mode = "RGB")
  9. hello_img.draw_string(20, 108, time.asctime(), scale = 1.0, color = (255, 255, 255), thickness = 1)
  10. display.show(hello_img)
  11. time.sleep(1)