MMM-Buttons icon indicating copy to clipboard operation
MMM-Buttons copied to clipboard

Buttons don't work until I test from terminal

Open gonzonia opened this issue 2 years ago • 4 comments

The plugin works fine for what I'm doing but in order for it to work I have to run a python based test program I have for testing the buttons. Once I do that it all works great. I have to do this every time the pi is rebooted. Any ideas?

gonzonia avatar Jul 10 '23 15:07 gonzonia

This is the python test program

import RPi.GPIO as GPIO
import time

GPIO.setmode(GPIO.BCM)

GPIO.setup(25, GPIO.IN, pull_up_down=GPIO.PUD_UP)
GPIO.setup(24, GPIO.IN, pull_up_down=GPIO.PUD_UP)


while True:
    input_state25 = GPIO.input(25)
    input_state24 = GPIO.input(24)
    if input_state25 == False:
        print('Button Pressed 25')
        time.sleep(0.2)
    if input_state24 == False:
        print('Button Pressed 24')
        time.sleep(0.2)

gonzonia avatar Jul 10 '23 15:07 gonzonia

I don't even have to press a button, just load that and then quit and the buttons start working.

gonzonia avatar Jul 10 '23 15:07 gonzonia

I can only get PIN 21 to work

faspina avatar Dec 31 '23 04:12 faspina

Same here. Ugh.

DocDrydenn avatar Aug 13 '24 15:08 DocDrydenn