Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 3882

Python • Re: stop loop with button press--raspberry pi and gpio

$
0
0
i couldnt find how to manually set a specific pin to high or low.
Consider a gpiozero LED to represent a pin you can write to or 'set'.

Then see the basic LED example documentation.
https://gpiozero.readthedocs.io/en/stab ... s.html#led

The script doesn't know or care whether there is actually an LED connected.

There are underlying 'Digital Output' classes available if the oversimplification troubles you.

Statistics: Posted by B.Goode — Thu Nov 21, 2024 12:39 pm



Viewing all articles
Browse latest Browse all 3882

Trending Articles