11-09-2024, 04:28 PM
Code:
pi@MoOde:~ $ sudo /var/www/daemon/gpio_buttons.py
bounce=150ms
btn1, enabled n, gpio 02, pull-up, cmd=sudo,poweroff
btn2, enabled n, gpio 03, pull-up, cmd=mpc,next
btn3, enabled n, gpio 04, pull-up, cmd=mpc,prev
btn4, enabled n, gpio 05, pull-up, cmd=mpc,toggle
btn5, enabled y, gpio 06, pull-up, cmd=mpc,stop
Traceback (most recent call last):
File "/var/www/daemon/gpio_buttons.py", line 90, in <module>
GPIO.setup(int(row['pin']), GPIO.IN, pull_up_down=int(row['pull']))
File "/usr/lib/python3/dist-packages/RPi/GPIO/__init__.py", line 696, in setup
_check(lgpio.gpio_claim_input(_chip, gpio, {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
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'