Skip to content

adding demo and picture frame scripts #826

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

geekinsanemx
Copy link

@geekinsanemx geekinsanemx commented Aug 8, 2025

adding two new scripts

demo.py just script to test screen functionalities
picture_frame.py convert the screen into a picture frame that slideshows pictures "smartly"

Turing Smart Screen Image Slideshow

Description:
This script displays an automated slideshow of images on a Turing Smart Screen display.
It supports both portrait and landscape images, automatically resizing and formatting them
to fit the display. Portrait images are displayed in pairs side-by-side.

Features:
- Automatic image rotation at configurable intervals
- Support for multiple display hardware revisions (A, B, C, D, SIMU)
- Time and date overlay on displayed images
- Recursive directory searching for images
- Automatic creation of default image if none found

Configuration:
1. Command Line Arguments:
   --debug       : Enable debug output (more verbose logging)
   --images PATH : Specify directory containing images (default: './images')
   --recursive   : Search for images recursively in subdirectories

2. Hardcoded Configuration (modify in code):
   - COM_PORT: Serial port for display ("AUTO" for auto-detection)
   - REVISION: Display hardware revision (A, B, C, D, or SIMU)
   - IMAGE_ROTATION_INTERVAL: Seconds between image changes (default: 30)
   - WIDTH, HEIGHT: Display dimensions in portrait mode (default: 320x480)

Usage:
1. Place images in the 'images' directory (or specify custom path with --images)
2. Run script: python3 picture_frame.py [options]
3. Press Ctrl+C to exit gracefully

Image Requirements:
- Supported formats: PNG, JPG/JPEG, BMP, GIF
- Any orientation (portrait or landscape)
- Will be automatically resized and formatted for display

Notes:
- To run picture_frame.py from any PATH environment folder (copied this script to run globally),
  must copy library/ folder to /home/${USER}/.local/lib/python<version>/site-packages/
- script creates a '.images' directory automatically for processed versions of source images.
- First run may be slow as it processes all images.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant