09_localTimeClock.py 447 B

1234567891011
  1. #!/usr/bin/env python
  2. #version : 2023.12.31
  3. #language : ch
  4. import time
  5. from maix import camera, display, image
  6. image.load_freetype("/root/preset/fonts/SourceHanSansCN-Regular.otf")
  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)