Data Sheet

UCTRONICS Ultimate Starter Leaning Kit for Raspberry Pi #K0064
62 www.uctronics.com
8.4 Project 4: Controlling an LED with a button
8.4.1 Overview
In this lesson, we will learn how to detect the status of a button, and then toggle the status of
LED based on the status of the button.
8.4.2 Requirement
Raspberry Pi ×1
Button ×1
LED ×1
220Ω Resistor ×1
Breadboard ×1
Several Jumper wires
8.4.3 Principle
1. What
s Button ?
Please refer to chapter 3.22.1 Button
2. Working Principle
The button we used is a normally open type button. The two contacts of a button are in the
off state under the normal conditions, only when the button is pressed they are closed.
The schematic diagram we used is as follows:
The button jitter must be happened in the process of using. The jitter waveform is as the
flowing picture: