Closed jayofelony closed 6 months ago
Apparently this has to do with the latest raspios Bookworm release. GPIO pins 8 and 17 are already being used.
in /boot/firmware/config.txt
add the following dtoverlay=spi0-0cs
and it should work.
Please tell me which line exactly to add?
I can't get the 4WD Smart Car Kit for Raspberry Pi to run. I have a Raspberry Pi5. I post the error that he writes below.
Hardware not supported Hardware not supported /usr/lib/python3/dist-packages/gpiozero/devices.py:295: PinFactoryFallback: Falling back from lgpio: 'can not open gpiochip' warnings.warn( Traceback (most recent call last): File "/usr/lib/python3/dist-packages/gpiozero/pins/pi.py", line 408, in pin pin = self.pins[info]
KeyError: PinInfo(number=15, name='GPIO22', names=frozenset({'WPI3', 'BCM22', 22, '22', 'BOARD15', 'GPIO22', 'J8:15'}), pull='', row=8, col=1, interfaces=frozenset({'', 'sdio', 'dpi', 'jtag', 'i2c', 'gpio'}))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/pi/Freenove_4WD_Smart_Car_Kit_for_Raspberry_Pi/Code/Server-pi5/test.py", line 73, in <module>
from Ultrasonic import *
File "/home/pi/Freenove_4WD_Smart_Car_Kit_for_Raspberry_Pi/Code/Server-pi5/Ultrasonic.py", line 8, in <module>
sensor = DistanceSensor(echo=echo_pin, trigger=trigger_pin ,max_distance=3)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/gpiozero/devices.py", line 103, in __call__
self = super().__call__(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/gpiozero/input_devices.py", line 827, in __init__
super().__init__(
File "/usr/lib/python3/dist-packages/gpiozero/input_devices.py", line 257, in __init__
super().__init__(
File "/usr/lib/python3/dist-packages/gpiozero/mixins.py", line 243, in __init__
super().__init__(*args, **kwargs)
File "/usr/lib/python3/dist-packages/gpiozero/input_devices.py", line 79, in __init__
super().__init__(pin, pin_factory=pin_factory)
File "/usr/lib/python3/dist-packages/gpiozero/devices.py", line 549, in __init__
pin = self.pin_factory.pin(pin)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/gpiozero/pins/pi.py", line 410, in pin
pin = self.pin_class(self, info)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/gpiozero/pins/rpigpio.py", line 101, in __init__
GPIO.setup(self._number, GPIO.IN, self.GPIO_PULL_UPS[self._pull])
RuntimeError: Cannot determine SOC peripheral base address
#
I have waveshare V2 e-paper and when I run the python test file I get an error: