Hi i’m Saymon,
I have new Tufty2040,
Ive installed Thonny, maked connection, updated file to 1.21.0,
Tufty works well, buttons works, i checked it with " button test.py"
After this basic things, i maked some tests,
learned how to display simple text,
then how to display one simple image,
from picographics import PicoGraphics, DISPLAY_TUFTY_2040
from jpegdec import JPEG
display = PicoGraphics(display=DISPLAY_TUFTY_2040)
j = JPEG(display)
j.open_file(“your_image.jpeg”)
j.decode()
display.update()
this mini code above works well,
then i tested it how to display 3 images with delay, also works good.
from picographics import PicoGraphics, DISPLAY_TUFTY_2040
from jpegdec import JPEG
import time
display = PicoGraphics(display=DISPLAY_TUFTY_2040)
j = JPEG(display)
List of image filenames
image_filenames = [“your_image01.jpeg”, “. your_image02.jpeg”, “your_image03.jpeg”]
Delay between image displays (adjust as needed, in seconds)
delay_between_images = 5 # Change this value to set the delay
for image_filename in image_filenames:
# Open and decode each image in the list
try:
j.open_file(image_filename)
j.decode()
display.update()
time.sleep(delay_between_images) # Introduce a delay between images
except OSError as e:
print(f"Error opening {image_filename}: {e}")
Now what was my goal: how to make images works with buttons?,
after a lot of tries, nothing works,
all factory mini programs where buttons are used works well.
How to write simple code to jumps between list of for example 8 images,
using UP and DOWN buttons?
Thanks for any help…