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

Automation, sensing and robotics • Re: Execution of scripts when pressing buttons connected to GPIO.

$
0
0
You will probably want to look at gpiozero button when-pressed and when-released. See https://gpiozero.readthedocs.io/en/stable/recipes.html
That way, you can tell how long it was pressed and take appropriate action to run scripts.
I have studied this article, but it is still a bit difficult for me. It is much easier for me to learn from real examples.
Is it possible to organize the algorithm that I described above? Maybe someone will offer a ready-made solution?

Statistics: Posted by smak15 — Sat Jun 22, 2024 12:36 am



Viewing all articles
Browse latest Browse all 4921

Trending Articles