06-24-2020, 04:46 PM
(This post was last modified: 06-24-2020, 04:46 PM by Tim Curtis.)
You could try adding some print statements to /var/www/command/gpio-buttons.py script and then run it manually from the cmd line after moOde boots up.
1. Add the print statement after the line below. I assume you are using Button 1.
2. Turn the GPIO button handler off in System config
3. Reboot
4. Run it from the command line
If 'button 1 command executed' is printed even though you physically did not press the button then it would suggest a possible wiring issue thats causing the GPIO pin to be in the wrong state after boot.
1. Add the print statement after the line below. I assume you are using Button 1.
Code:
subprocess.call(sw_1_cmd)
print('button 1 command executed')
2. Turn the GPIO button handler off in System config
3. Reboot
4. Run it from the command line
Code:
sudo /var/www/command/gpio-buttons.py
If 'button 1 command executed' is printed even though you physically did not press the button then it would suggest a possible wiring issue thats causing the GPIO pin to be in the wrong state after boot.