Embedded control of an animated sign synchronized with an LED array
Install Necessary Libraries
You will need the following Python libraries:
Pillow for image processing. pygame for displaying the GIF on the touchscreen. Jetson.GPIO for controlling the LED array (This setup uses Jetson Nano, but code can be easily adapted to Raspberry Pi with "RPi.GPIO"). Install these using pip:
pip install pillow Jetson.GPIO TIME-python
signiot accomplishes the following tasks:
- GPIO Initialization: Sets up the GPIO pins for the LED array.
- LED Control Function: Lights up LEDs in sequence based on the direction.
- Vertical Shear Function: Applies an affine transformation to shear the image vertically.
- GIF Processing: Loads the GIF and applies the shear transformation to each frame.
- Tkinter Initialization: Sets up Tkinter for displaying the GIF on the touchscreen.
- Main Loop: Alternates the shear direction and displays the GIF frames, updating the LED array accordingly.
This script will continuously shear the GIF in both directions and update the LED array to indicate the current transformation direction.