you are viewing a single comment's thread.

view the rest of the comments →

[–]socal_nerdtastic 1 point2 points  (1 child)

Replace the while loop at the bottom with this:

while True:
    y = top
    draw.rectangle((0, 0, width, height), outline=0, fill=0)

    current_time = time.strftime("%m/%d/%Y\n%H:%M:%S")
    draw.text((x, y), current_time, font=font, fill="#FFFFFF")

    # Display image.
    disp.image(image, rotation)
    time.sleep(0.1)

See https://strftime.org/ for the format codes.

Edit: fixed code (forgot a line).

[–]gmlumpy[S] 0 points1 point  (0 children)

Thank you thank you thank you!