EasyManuals Logo

Freenove Ultimate Starter Kit User Manual

Freenove Ultimate Starter Kit
286 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #65 background imageLoading...
Page #65 background image
65
Chapter 2 Button & LED
ā–ˆ www.freenove.com
support@freenove.com ā–ˆ
Project 2.2 MINI table lamp
We will also use a button, LED and UNO to make a MINI table lamp. But the function is different: Press the
button, the LED will be turned on, and press the button again, the LED goes out.
First, let us learn some knowledge about the button.
Debounce for Push Button
When a Push Button is pressed, it will not change from one state to another state immediately. Due to
mechanical vibration, there will be a continuous buffeting before it becomes another state. And the releasing-
situation is similar with that process.
Therefore, if we directly detect the state of Push Button, there may be multiple pressing and releasing action
in one pressing process. The buffeting will mislead the high-speed operation of the microcontroller to cause
a lot of false judgments. So we need to eliminate the impact of buffeting. Our solution is: to judge the state
of the button several times. Only when the button state is stable after a period of time, can it indicate that the
button is pressed down.
This project needs the same components and circuits with the last section.
Ideal state
Virtual state
press stable release stable

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Freenove Ultimate Starter Kit and is the answer not in the manual?

Freenove Ultimate Starter Kit Specifications

General IconGeneral
BrandFreenove
ModelUltimate Starter Kit
CategorySingle board computers
LanguageEnglish