Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 1246

Python • Symptom: SOC peripheral base address error when using tm1637 package

$
0
0
I am trying to follow a guide (https://thingsdaq.org/2022/10/02/7-segm ... pberry-pi/) for using a 7 segment LED display, with my raspberry pi 5 and I get this error:

Code:

Traceback (most recent call last):  File "/home/przb/Workspaces/led/led.py", line 24, in <module>    tm = tm1637.TM1637(clk=CLK_PIN, dio=DIO_PIN)         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File "/home/przb/Workspaces/led/embed/lib/python3.11/site-packages/tm1637.py", line 62, in __init__    GPIO.setup(self.clk, GPIO.OUT, initial=GPIO.LOW)RuntimeError: Cannot determine SOC peripheral base address
This is my full python code:

Code:

import tm1637import timeimport numpy as npfrom datetime import datetimefrom gpiozero import CPUTemperatureCLK_PIN = 5DIO_PIN = 6# Creating 4-digit 7-segment display objecttm = tm1637.TM1637(clk=CLK_PIN, dio=DIO_PIN)  # Using GPIO pins 18 and 17clear = [0, 0, 0, 0]  # Defining values used to clear the display# Displaying a rolling stringtm.write(clear)time.sleep(1)s = 'This is pretty cool'tm.scroll(s, delay=250)time.sleep(2)
After doing some googling, I saw that the raspi 5 is not supported by some packages. Is that true? Is there a workaround?
I am using Raspberry Pi OS based on Debian 12 Bookworm

thanks in advance.

Statistics: Posted by the_senate — Sat Mar 01, 2025 5:32 am



Viewing all articles
Browse latest Browse all 1246

Trending Articles