Hi All,
Complete Newbie here, so please be kind ![]()
I have successfully completed the build on Pidog V2 with a Raspberry Pi 5 and when I first set it up I could run all the example code without issues. However today when I have connected up (connecting via windows powershell works fine), none of the example code will run successfully and in every case I get a series of code errors always finishing with a “GPIO busy” error is being reported. The Pidog will still connect perfectly to the Sunfounder App and all functions on there work without fault. I’ve re-booted both the laptop and the Pidog to no avail and not sure what to try next…any thoughts please?
Example:
sudo python3 1_wake_up.py
Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/gpiozero/pins/pi.py”, line 411, in pin
pin = self.pins[info]
~~~~~~~~~^^^^^^
KeyError: PinInfo(number=29, name=‘GPIO5’, names=frozenset({‘BCM5’, 5, ‘BOARD29’, ‘WPI21’, ‘J8:29’, ‘GPIO5’, ‘5’}), pull=‘’, row=15, col=1, interfaces=frozenset({‘’, ‘gpio’, ‘dpi’, ‘uart’, ‘i2c’, ‘spi’}))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/home/mrcrispi/pidog/examples/1_wake_up.py”, line 7, in
my_dog = Pidog(head_init_angles=[0, 0, -30])
File “/usr/local/lib/python3.13/dist-packages/pidog/pidog.py”, line 131, in init
utils.reset_mcu()
~~~~~~~~~~~~~~~^^
File “/usr/local/lib/python3.13/dist-packages/robot_hat/utils.py”, line 155, in reset_mcu
pin = Pin(“MCURST”)
File “/usr/local/lib/python3.13/dist-packages/robot_hat/pin.py”, line 96, in init
self.setup(mode, pull, active_state)
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.13/dist-packages/robot_hat/pin.py”, line 134, in setup
self.gpio = OutputDevice(self._pin_num)
~~~~~~~~~~~~^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/gpiozero/devices.py”, line 108, in call
self = super().call(*args, **kwargs)
File “/usr/lib/python3/dist-packages/gpiozero/output_devices.py”, line 74, in init
super().init(pin, pin_factory=pin_factory)
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/gpiozero/mixins.py”, line 75, in init
super().init(*args, **kwargs)
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/gpiozero/devices.py”, line 553, in init
pin = self.pin_factory.pin(pin)
File “/usr/lib/python3/dist-packages/gpiozero/pins/pi.py”, line 413, in pin
pin = self.pin_class(self, info)
File “/usr/lib/python3/dist-packages/gpiozero/pins/lgpio.py”, line 126, in init
lgpio.gpio_claim_input(
~~~~~~~~~~~~~~~~~~~~~~^
self.factory._handle, self._number, lgpio.SET_PULL_NONE)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/lgpio.py”, line 755, in gpio_claim_input
return _u2i(_lgpio._gpio_claim_input(handle&0xffff, lFlags, gpio))
File “/usr/lib/python3/dist-packages/lgpio.py”, line 458, in _u2i
raise error(error_text(v))
lgpio.error: ‘GPIO busy’