User Manual
42
Lesson 6 Button Module
Introduction
In this lesson, we will use button module to control a dual-color LED module.
Components
- 1 * Raspberry Pi
- 1 * Breadboard
- 4 * Jumper wires (Male to Male, 2 red and 2 black)
- 1 * Network cable (or USB wireless network adapter)
- 1 * Button module
- 1 * Dual-color LED module
- 2 * 3-Pin anti-reverse cable
Experimental Principle
Use a normally open button as an input device of Raspberry Pi. When the button is pressed,
the General Purpose Input/Output (GPIO) connected to the button will change to low level
(0V). You can detect the state of the GPIO through programming. That is, if the GPIO turns
into low level, it means the button is pressed, so you can run the corresponding code. In this
experiment, we will print a string on the screen and control an LED.
The schematic diagram:










