The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.34 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Problem: GPIO buttons on moOde 9.1.4
#1
Good day. Today I updated the player from version 8.3.9 to 9.1.4 and I have problems with gpio buttons.
With the GPIO button configured, but not activated the script runs cleanly and printls out the configuration:
Code:
pi@MoOde:/home/pi# 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 n, gpio 06, pull-up, cmd=mpc,stop
btn6, enabled n, gpio 07, pull-up, cmd=
btn7, enabled n, gpio 08, pull-up, cmd=
btn8, enabled n, gpio 09, pull-dn, cmd=
When the button is enabled:
Code:
pi@MoOde:~ $ sudo /var/www/daemon/gpio_buttons.py
bounce=150ms
btn1, enabled y, gpio 02, pull-up, cmd=sudo,poweroff
Traceback (most recent call last):
 File "/var/www/daemon/gpio_buttons.py", line 60, in <module>
   GPIO.add_event_detect(int(row['pin']), GPIO.RISING, callback=btn_1_event, bouncetime=bounce_time)
 File "/usr/lib/python3/dist-packages/RPi/GPIO/__init__.py", line 858, in add_event_detect
   _check_input(mode)
 File "/usr/lib/python3/dist-packages/RPi/GPIO/__init__.py", line 249, in _check_input
   raise RuntimeError(msg)
RuntimeError: You must setup() the GPIO channel as an input first
On versions below 9, such a problem did not occur
Reply


Messages In This Thread
GPIO buttons on moOde 9.1.4 - by Egor-Gl - 11-09-2024, 01:11 PM
RE: GPIO buttons on moOde 9.1.4 - by Tim Curtis - 11-09-2024, 03:22 PM
RE: GPIO buttons on moOde 9.1.4 - by Egor-Gl - 11-09-2024, 03:40 PM
RE: GPIO buttons on moOde 9.1.4 - by Egor-Gl - 11-09-2024, 04:28 PM
RE: GPIO buttons on moOde 9.1.4 - by Tim Curtis - 11-09-2024, 05:00 PM
RE: GPIO buttons on moOde 9.1.4 - by Egor-Gl - 11-10-2024, 05:25 AM
RE: GPIO buttons on moOde 9.1.4 - by Tim Curtis - 11-10-2024, 12:34 PM
RE: GPIO buttons on moOde 9.1.4 - by Egor-Gl - 11-10-2024, 12:56 PM
RE: GPIO buttons on moOde 9.1.4 - by Egor-Gl - 11-14-2024, 02:39 PM
RE: GPIO buttons on moOde 9.1.4 - by Tim Curtis - 11-14-2024, 04:03 PM

Forum Jump: