I am using Tasker to send an SSH message to a RasPi when I get a message. That script turns on an LED so I can see that I missed an incoming text message. I would like to have a physical GPIO button turn the LED off but haven't found a way. Here's what I have tried, which should be the easiest:
I am sure of my connections. I have confirmed that the switch is open when released and closed when pressed. Is the LED staying on because a different script turned it on?
Code:
from gpiozero import LED, Buttonfrom signal import pauseled = LED(20)button = Button(7)button.when_pressed = led.offpause()
Statistics: Posted by duckredbeard — Wed Dec 11, 2024 2:13 pm