TM1637 Display Library for Raspberry Pi 5 (gpiod-based)
This is a modified version of the raspberrypi-tm1637 library, adapted to work on Raspberry Pi 5 using the gpiod backend.
🚀 Why this version?
The Raspberry Pi 5 uses a new GPIO controller that is not compatible with RPi.GPIO, which the original TM1637 library depends on.
This version replaces RPi.GPIO with gpiod (libgpiod), the officially supported GPIO access method in Raspberry Pi OS (Bookworm and newer).
Now, version 2.0.0 of tm1637-rpi5-gpiod, auto-detects whether libgpiod v1 or v2 is present and uses the appropriate backend:
- libgpiod v1 (legacy API): per-line requests
- libgpiod v2 (new API):
LineSettings+request_lines()+LineRequest.set_value()
📥 Installation
-
Install required dependencies:
sudo apt update sudo apt install python3-libgpiod gpiod
-
Install the library via pip:
pip install tm1637-rpi5-gpiod
Or clone manually:
git clone https://github.com/villeparamio/tm1637-rpi5-gpiod.git cd tm1637-rpi5-gpiod pip install .
🧪 Example usage
import tm1637
from time import sleep
CLK = 24 # GPIO24 (physical pin 18)
DIO = 23 # GPIO23 (physical pin 16)
display = tm1637.TM1637(clk=CLK, dio=DIO)
display.brightness(7)
while True:
display.show("TEST")
sleep(2)
display.numbers(12, 34)
sleep(2)
Make sure your user is in the
gpiogroup to access/dev/gpiochip*without root.
If needed:sudo usermod -aG gpio $USER && sudo reboot
🛠 Features
- ✅ Raspberry Pi 5 compatible
- ✅ Uses
gpiod, notRPi.GPIO - ✅ Works with standard 4-digit TM1637 LED displays
- ✅ Supports numbers, text, brightness and temperature
🔄 Original sources
📜 License
This project is licensed under the MIT License.
💖 Donations
If you find this project useful and want to support its development and maintenance, please consider making a donation.
Your contribution helps us continue improving and maintaining this free software.
💸 PayPal
You can easily donate via PayPal by clicking the button below:
Thank you for your support. 🙏
Metadata
Release files for tm1637-rpi5-gpiod 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tm1637_rpi5_gpiod-2.0.0.tar.gz | 6.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tm1637_rpi5_gpiod-2.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.4 kB
Release files / tm1637_rpi5_gpiod-2.0.0.tar.gz
| Download URL | tm1637_rpi5_gpiod-2.0.0.tar.gz |
|---|---|
| Size | 6.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
767f5bd7d5d9242a4fd3375a582e57fadfa5a6ca3b5ab2864e51b62a75fcbdc1
|
|
BLAKE2b-256 checksum How to use checksums |
49f4aa8f1f30607a698e6387bdfbe750091018e2cc94d4af25de2ee7fd270f57
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.2
|
Release files / tm1637_rpi5_gpiod-2.0.0-py3-none-any.whl
| Download URL | tm1637_rpi5_gpiod-2.0.0-py3-none-any.whl |
|---|---|
| Size | 6.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4a2b8af2a2a53c03801ae47ca3a59afeaf502659d0ae95d23ea228bf4ccb2cfa
|
|
BLAKE2b-256 checksum How to use checksums |
e6f034b71aef0141f9e91a4459f66d3b8643ba1e6eb232486a3e1765e63da244
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.2
|