Data Sheet

UCTRONICS Ultimate Starter Leaning Kit for Raspberry Pi #K0064
63 www.uctronics.com
Each time you press the button, the Raspberry Pi will think you have pressed the button
many times due to the jitter of the button. We must to deal with the jitter of buttons before
we use the button. We can through the software programming method to remove the jitter
of buttons, and you can use a capacitance to remove the jitter of buttons. We introduce the
software method. First, we detect whether the level of button interface is low level or high
level. When the level we detected is low level, 5~10 MS delay is needed, and then detect
whether the level of button interface is low or high. If the signal is low, we can confirm that
the button is pressed once. You can also use a 0.1uF capacitance to clean up the jitter of
buttons. The schematic diagram is shown in below:
3. Interrupt
Hardware interrupts were introduced as a way to reduce wasting the processor's valuable
time in polling loops, waiting for external events. They may be implemented in hardware as a
distinct system with control lines, or they may be integrated into the memory subsystem.
4. Key functions:
Python user:
GPIO.input(channel)
This is used for reading the value of a GPIO pin. Where channel is the channel number based
on the numbering system you have specified (BOARD or BCM)). This will return either 0 /
GPIO.LOW / False or 1 / GPIO.HIGH / True.
GPIO.add_event_detect(channel, mode)