Quantcast
Viewing all articles
Browse latest Browse all 5131

Python • Re: Button to restart Pi, button to restart program


Any of them?
I was unable to get the first two to work with a virtual environment. And the event driven suggestion would not work because you cannot start a thread more than once, which I could not find a way around. I am looking forward to exploring these concepts in the future if my hobbies take me there.
You do realise that if you sleep for 1 second you will miss a lot of button presses that last less than a second?
I do, but for the scope of this hobby project it is fine to hold it down for two seconds. I happened to figure out the countdown feature after spending time learning the new concepts presented to me in the post. I just can't spend more time on this script for fine-tuning.

Statistics: Posted by BlueBarryCat — Fri Aug 30, 2024 2:16 am



Viewing all articles
Browse latest Browse all 5131

Trending Articles