Тёмный
No video :(

How to De-Bounce Switches on the Arduino - Ultimate Guide to the Arduino #21 

Circuit Basics
Подписаться 67 тыс.
Просмотров 7 тыс.
50% 1

Switch bounce is a problem with most mechanical switches, but it can be easily fixed on the Arduino using hardware or software solutions. In this video I try several different ways to de-bounce switches on the Arduino and identify which method is the most effective.
This is tutorial #21 in the Ultimate Guide to the Arduino, a complete video course on the Arduino microcontroller with 45 lessons that are designed to teach anyone how to master the Arduino at any skill level. Visit our RU-vid channel page to watch the entire series!
Get the 3-in-1 Arduino Smart Car and IOT Learning Kit from SunFounder here:
www.sunfounder...
Or get the kit from Amazon:
US Amazon: amzn.to/3W1Mahh
DE Amazon: amzn.to/3j0oETn
JP Amazon: amzn.to/3UYrHZG
UK Amazon: amzn.to/3uTJZAC
CA Amazon: amzn.to/3W2vExN
Get the SN74HC14 Schmitt trigger IC from SunFounder here: www.sunfounder...
Visit the webpage for this video tutorial on Circuit Basics for wiring diagrams and example code:
www.circuitbas...
And be sure to check out the Circuit Basics blog and social media for more articles and tutorials on the Raspberry Pi, Arduino and other DIY electronic projects!
www.circuitbas...
Facebook: / circuitbasic
Twitter: / circuitbasics
Instagram: / circuitbasics

Опубликовано:

 

22 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 12   
@DesertVox
@DesertVox Год назад
The simplest software debouncing is done using just a delay of about 50 ms. If the digitalRead after that delay is a LOW (assuming the push button is pulled HIGH), then the button has been pressed. But to even further simplify the code, we don't even have to do a second digitalRead. We just assume that the first trigger of the button is enough, because buttons don't get triggered out of nowhere. There has to be button press to trigger the first digitalRead. It's just two lines of code, and that's it, debouncing done!
@reyhurm
@reyhurm Год назад
What do I have to do if I want to count how many times a button is pressed? Did you realized your solution only works for a single pressing time?
@DesertVox
@DesertVox Год назад
@@reyhurm Yes, this simple solution is for registering a simple button press. You can add a counter after each delay.
@eyehatedog
@eyehatedog 11 месяцев назад
delay is bad, it stop the whole code!
@MartinBgelund
@MartinBgelund Год назад
Thanks. You should make an example of debouncing when using hardware interrupts. Nobody uses polling for button presses.
@rajibahmed5703
@rajibahmed5703 Месяц назад
Very Nice tutorial video.
@mikeduino4596
@mikeduino4596 9 месяцев назад
Actually the 7414 output on your timing diagram should be flipped, as the Schmitt trigger is an inverter. Otherwise, it is correct.
@ericgrante7043
@ericgrante7043 Год назад
hello, good video. thanks
@rajibahmed5703
@rajibahmed5703 Месяц назад
We can use the knowledge about delay without blocking programe. I'm talking about millis()
@JamesFraley
@JamesFraley 8 месяцев назад
Great video! Very informative.
@GuruprasadGV
@GuruprasadGV 5 дней назад
Why not interrupts
Далее
How to debounce a button (Hardware approach)
10:16
Просмотров 22 тыс.
Easily De-bounce your Switches
6:14
Просмотров 2,5 тыс.
What If Formula 1 Had No Rules?
19:01
Просмотров 4,2 млн
Fixing my counter's bouncy button
27:18
Просмотров 7 тыс.
Rotary Encoder (KY-040) Debounce Circuit Tutorial
15:03