How to Use Push Buttons on the Arduino - Ultimate Guide to the Arduino #7

preview_player
Показать описание
Learn how to connect and program push buttons on the Arduino. In this video we discuss everything you need to know, including floating pins, pull-up resistors, pull-down resistors, and the Arduino's internal pull-up resistor. 

This is tutorial #7 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 YouTube channel page to watch the entire series!

Get the 3-in-1 Arduino Smart Car and IOT Learning Kit from SunFounder here:

Or get the kit from Amazon:

Get some push buttons from SunFounder here:

Visit the webpage for this video tutorial on Circuit Basics for wiring diagrams and example code:

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!
Рекомендации по теме
Комментарии
Автор

I love this video! This made me understand pullup and pulldown resistors easily. I like how there were many methods presented and explained each of the problems that can be encountered and how it can be fixed! You earned a subscriber!

mateoichijo
Автор

It would be great to address the debounce aspect. It is especially useful when you implement a toggle function.

jean-paulpetillon
Автор

Just double checking to make sure I understand what's going on: (when using the pull-up resistor) the Arduino returns a value of '0' or 'LOW' using digitalRead at pin 7 when the button is pressed (closed state) because the current flows to ground, correct? Or am I way off? I can understand how the pull-up resistor keeps the button's open state high - thereby returning a value of '1' or 'HIGH' using digitalRead at pin 7. I just don't quite get why pressing the button (closed state) returns the '0' or 'LOW' value. Thanks for these great videos BTW!

lawrencecsaszar
Автор

Hi quick question. At 8:30, why does the stray electromagnetic energy not go to port 7 but go to the resistor? Thanks!

krishpatil
Автор

Your video’s are great.. cheers from Australia

regomag
Автор

the 'declare' command is like the Matryoshka dolls stacking up the same thing with different labels, it takes time for beginners to understand and use it, and the analog and digital read/write commands also baffle beginners.

hetori
Автор

Hi,
I built a similar Arduino woth the Motor Control board. However I had issues with using the infrared Control. There was a conflict as both libraries used a common timer ? routine. Have you experienced this issue. Great video by the way thanks.
Owen

owenvinall