🛠 Using Smart Display Module GPIOs
Objectives
This tutorial guides you through using the General Purpose Input/Output (GPIO) pins available on the Raspberry Pi Smart Display Module. Although this module is primarily designed for professional display via the Intel SDM standard, it retains access to the Raspberry Pi Compute Module 5's GPIOs. The goal is to understand how to light an LED or read a simple state, demonstrating the module's flexibility for light automation or interactive signage projects.
Required Hardware
- A Raspberry Pi Smart Display Module (SDM adapter)
- A Raspberry Pi Compute Module 5
- An SDM-compatible development board or adapter with accessible GPIO connector
- A red LED and a 330-ohm resistor
- Jumper wires
- A computer with Raspberry Pi OS installed on the CM5 (via USB-C or network)
Steps
``bash sudo apt update sudo apt install python3-gpiozero ``
```python from gpiozero import LED from time import sleep
- Hardware Preparation: Completely power off the Raspberry Pi Compute Module 5. Locate the standard GPIO connector (40 pins) accessible on your setup. If using a full SDM screen, ensure the module is properly inserted and pin access is possible via an expansion port or breakout adapter.
- LED Wiring: Connect the LED's long leg (anode) to GPIO pin 17 (physical pin 11) via the 330-ohm resistor. The resistor limits current to protect the LED and module. Connect the short leg (cathode) to a ground (GND) pin, such as physical pin 6.
- Library Installation: Open a terminal on your Raspberry Pi. Update the system and install the
RPi.GPIOorgpiozerolibrary, which simplifies pin control. - Python Script Creation: Create a new file named
test_gpio.py.
# LED connected to GPIO 17 led = LED(17)
while True: led.on() print("LED On") sleep(1) led.off() print("LED Off") sleep(1) ```
``bash python3 test_gpio.py ``
- Script Execution: Run the program from the terminal. The LED should blink, alternating messages in the console.
Verification
Physically observe the LED. It should turn on and off exactly once per second. If the LED does not react, check the wiring polarity (anode/cathode) and ensure the script is executed with necessary permissions. Verify that the Compute Module 5 is properly powered and booted.
Further Reading
The Smart Display Module is optimized for silent 4K display and content management. You can extend this project by using GPIOs to trigger display changes on the SDM screen via control scripts. Also, explore the M.2 slot to add fast storage or a Hailo AI accelerator, enabling real-time analysis of GPIO inputs for intelligent signage applications.
Other tutorials for this board
- Getting started with the Raspberry Pi Smart Display Module
- Connect the Smart Display Module to the network for digital signage
- Getting Started with the Raspberry Pi Smart Display Module
- Interfacing GPIO and sensors with the Smart Display Module
- Deploying an autonomous digital signage with M.2 storage
- Getting Started with the Smart Display Module on Compute Module 5
Code examples for this board
gpio-led-blink-python.pyPythondht22-sensor-monitor.pyPythonwifi-status-checker.pyPythonm2-ssd-mount-check.shBashhailo-inference-test.pyPythongpio-led-status-indicator.pyPython