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

Поделиться
HTML-код
  • Опубликовано: 28 авг 2024
  • 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 RUclips 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 some push buttons 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

Комментарии • 9

  • @mateoichijo3408
    @mateoichijo3408 Год назад +3

    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!

  • @jean-paulpetillon5462
    @jean-paulpetillon5462 Год назад +1

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

    • @Circuitbasics
      @Circuitbasics  Год назад +1

      We actually have a separate video about switch and button de-bouncing that we are going to publish soon... But in the meantime, here's an article on our website that covers most of what you need to know: www.circuitbasics.com/how-to-use-switch-debouncing-on-the-arduino/

  • @lawrencecsaszar5497
    @lawrencecsaszar5497 6 месяцев назад

    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!

  • @krishpatil1788
    @krishpatil1788 4 месяца назад

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

  • @regomag8801
    @regomag8801 Год назад

    Your video’s are great.. cheers from Australia

  • @hetori9918
    @hetori9918 7 месяцев назад

    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.

  • @owenvinall9970
    @owenvinall9970 Год назад

    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