Code a holdable button with GPIO Zero on the Raspberry Pi

Martin O’Hanlon has worked out how to extend GPIO Zero and has coded up a ‘holdable button’. This means that you can code a physical button to do one thing on a momentary press and another thing when the button is held for more than a specified amount of time. Hopefully this will be absorbed into the main GPIO Zero library at some point. Until then, you can download the code from Martin’s blog.

2 comments for “Code a holdable button with GPIO Zero on the Raspberry Pi

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.