menu_book Course Curriculum (Raspberry Pi) expand_more
Linux & Setup
GPIO Digital I/O
Sensors & Buses
Automation
Networking & Services
button debounce
Learn button debounce in Raspberry Pi with a dedicated explanation, a concept-specific example, practical cautions, and a mastery check.
12 min read
•
Beginner
raspberry-pi-013.py
python
from gpiozero import Button
button=Button(2,pull_up=True,bounce_time=0.08)
button.when_pressed=lambda: print('single debounced press')
input('press Enter to stop')
What to watch
Content source & attribution
Original Syntaxis Content · Original Syntaxis Content