When I try and run the 2_function_demonstration.py it doesn’t work and I get the following in my terminal. Raspberry Pi4 latest Bookworm OS Thanks, Steve.
Blockquote
pidog@pidog:~ $ cd ~/pidog/examples
pidog@pidog:~/pidog/examples $ sudo python3 2_function_demonstration.py
config_file: /home/pidog/.config/pidog/pidog.conf
robot_hat init … done
imu_sh3001 init … done
rgb_strip init … done
dual_touch init … done
sound_direction init … done
sound_effect init … done
ultrasonic init … done
ERROR: Color number is greater than COLORS-1 (7).
Stopping and returning to the initial position …
Quit
Exception ignored in atexit callback: <function _shutdown at 0x7f75b78fe0>
Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/gpiozero/devices.py”, line 627, in _shutdown
_devices_shutdown()
File “/usr/lib/python3/dist-packages/gpiozero/devices.py”, line 620, in _devices_shutdown
dev.close()
File “/usr/lib/python3/dist-packages/gpiozero/mixins.py”, line 79, in close
super().close()
File “/usr/lib/python3/dist-packages/gpiozero/devices.py”, line 568, in close
self._pin.close()
File “/usr/lib/python3/dist-packages/gpiozero/pins/lgpio.py”, line 133, in close
lgpio.gpio_claim_input(
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’
Exception ignored in: <function GPIOBase.del at 0x7f75b6f7e0>
Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/gpiozero/devices.py”, line 148, in del
File “/usr/lib/python3/dist-packages/gpiozero/mixins.py”, line 79, in close
File “/usr/lib/python3/dist-packages/gpiozero/devices.py”, line 568, in close
File “/usr/lib/python3/dist-packages/gpiozero/pins/lgpio.py”, line 133, in close
File “/usr/lib/python3/dist-packages/lgpio.py”, line 755, in gpio_claim_input
File “/usr/lib/python3/dist-packages/lgpio.py”, line 458, in _u2i
lgpio.error: ‘GPIO busy’
pidog@pidog:~/pidog/examples $