No video

How to Use Digital INPUT and INPUT_PULLUP on Arduino

This basic Arduino tutorial will show how to use the digital input pins and explore the pull up and pull down resistors.
👉Subscribe for more robotics and engineering tips:
/ @theboredrobotllc
Share this video with a friend:
• How to Use Digital INP...
Affiliate Links:
Arduino Uno - amzn.to/35apJ0Z
Arduino Starter Kit - amzn.to/2X8hAWy
Connect:
Instagram - /theboredrobot
Twitter - @theboredrobot
Facebook - / the-bored-robot-104225...
Pinterest - /TheBoredRobot
Disclaimer: This video contains affiliate links, meaning that if you make a purchase from one of the product links, I'll receive a small commission.
Music: Chill, Sakuta Hz: sakurahertz.ca...

Пікірлер: 66

  • @tb-vr1qv
    @tb-vr1qv3 ай бұрын

    I watched an hour and a half of videos trying to understand pull up resistors, this is the best video i found and now i get it. Thanks :)

  • @TheBoredRobotLLC

    @TheBoredRobotLLC

    3 ай бұрын

    Glad it helped

  • @Alex-fs6kz
    @Alex-fs6kz3 жыл бұрын

    This is awesome! I've been confused by this concept for a while but you've helped clarify it for me.

  • @TheBoredRobotLLC

    @TheBoredRobotLLC

    3 жыл бұрын

    I'm glad this helped!

  • @nickverzilli3181
    @nickverzilli3181 Жыл бұрын

    struggling with something similar to this for about a week. it has been resolved in 3 minutes and 52 seconds. thank you.

  • @TheBoredRobotLLC

    @TheBoredRobotLLC

    Жыл бұрын

    I'm glad you were able to learn from this video!

  • @samsonamanuel9849
    @samsonamanuel98492 жыл бұрын

    Thanks a lot, that was really helpful but can you increase the you size when your writing the code it's a bit hard to see for some of us

  • @TheBoredRobotLLC

    @TheBoredRobotLLC

    2 жыл бұрын

    My apologies for this. I have been getting that request a lot and I will make sure the size is larger for my future videos. A copy of the code for this example can be found here: github.com/TheBoredRobot/Arduino-Examples/blob/master/Digital_Input.ino

  • @pacomacaw2456
    @pacomacaw24563 жыл бұрын

    I have been so confused by this concept. I have watched many other vids, but this is the one that gave me the "ah ha!...so that's it!" moment. Many thanks.

  • @TheBoredRobotLLC

    @TheBoredRobotLLC

    3 жыл бұрын

    Thank you! I'm glad it helped you understand.

  • @RMann-mb2jw
    @RMann-mb2jw9 ай бұрын

    gracias buen hombre, definitivamente me has sido de ayuda

  • @TheBoredRobotLLC

    @TheBoredRobotLLC

    9 ай бұрын

    I'm glad I could be of some help!

  • @kirinplays9858
    @kirinplays98582 жыл бұрын

    Thank you for making this video.. ;D

  • @TheBoredRobotLLC

    @TheBoredRobotLLC

    2 жыл бұрын

    I'm pleasure. I hope it helped.

  • @davinchandra7406
    @davinchandra74063 жыл бұрын

    thankyou for the tutorial, it would be even more helpful if you zoom in the code you are writing :D

  • @TheBoredRobotLLC

    @TheBoredRobotLLC

    3 жыл бұрын

    Thanks for the feedback. I will start doing that for future videos.

  • @arduinomaquinas
    @arduinomaquinas6 ай бұрын

    Nice 👏👏👏

  • @TheBoredRobotLLC

    @TheBoredRobotLLC

    6 ай бұрын

    Thank you!

  • @HothamsApiary
    @HothamsApiary2 жыл бұрын

    great video. This can be very frustrating if you dont know what the resistors are doing.

  • @TheBoredRobotLLC

    @TheBoredRobotLLC

    2 жыл бұрын

    Thanks!

  • @stephaneamsellem4806
    @stephaneamsellem4806 Жыл бұрын

    Holy .....Grail !!! You help me to find it !!!

  • @TheBoredRobotLLC

    @TheBoredRobotLLC

    Жыл бұрын

    Thanks! I'm glad it helped.

  • @rafiihsanalfathin9479
    @rafiihsanalfathin94792 ай бұрын

    What is the advantage/disadvantage of using external pull up resistor other than the internal one?

  • @TheBoredRobotLLC

    @TheBoredRobotLLC

    2 ай бұрын

    One advantage of an external one is if you wanted to use a resistor with a different resistance value than the internal one.

  • @rafiihsanalfathin9479

    @rafiihsanalfathin9479

    2 ай бұрын

    @@TheBoredRobotLLC but why does that matter? Isnt the point of using pull up resistor is so that ur button is not in floating state? So the value of resistor doesn't matter anyway as long as it is high enough to be stable

  • @TheBoredRobotLLC

    @TheBoredRobotLLC

    Ай бұрын

    @@rafiihsanalfathin9479 Yes that is true, but by variable resistance, I was referring to applications that you may want to control current draw.

  • @youpattube1
    @youpattube12 жыл бұрын

    I found your example to be slightly confusing, and too specific for the title of the video. I re-numbered the pins to reduce confusion with the button numbers, and eliminated the buttons altogether because the video is about Input/Input Pullups, and can be demonstrated more simply without the use of buttons. Another video about debouncing could follow up. It came out nicely, is well commented and runs well. I would like to offer it to you (and everybody else) as a gift in recognition of the work you did to help us. But I don't know how to send you a sketch. can you give me an upload link ?

  • @TheBoredRobotLLC

    @TheBoredRobotLLC

    2 жыл бұрын

    Thank you for the feedback! If you want to share a sketch, maybe posting a GitHub link here or on my blog could be an option. You can comment on this specific blog entry here: www.theboredrobot.com/post/how-to-use-digital-input-and-input_pullup-on-arduino Or you could contact me directly here: www.theboredrobot.com/contact

  • @kenji1599
    @kenji15993 жыл бұрын

    Thanks for the video! How come it has to be a 10k resistor? Wouldn't a jumper cable also do the same thing (pull pin 3 to 5v)? I am still learning about basic electronic concepts so sorry if it's a bad question lol

  • @TheBoredRobotLLC

    @TheBoredRobotLLC

    3 жыл бұрын

    It doesn't have to be a 10k resistor. A different resistor will work in this example. However, you need to have a resistor, because without it, you're actually creating a short circuit.

  • @kenji1599

    @kenji1599

    3 жыл бұрын

    @@TheBoredRobotLLC Ah, ok. Thank you!

  • @taranagnew436
    @taranagnew4362 жыл бұрын

    would you use a input-pullup if you have a design and want to make it smaller (not enough room or breadboard)?

  • @TheBoredRobotLLC

    @TheBoredRobotLLC

    2 жыл бұрын

    Yes, that could be a use for this. I often use input_pullup when I'm using encoders.

  • @ammartamimi9864
    @ammartamimi9864 Жыл бұрын

    does that mean: INPUT_PULLUP just supply the pin with +5V with a resistor, and INPUT is pin voltage is ground?

  • @TheBoredRobotLLC

    @TheBoredRobotLLC

    Жыл бұрын

    INPUT_PULLUP connects an internal resistor from the digital pin to 5V. Using the INPUT command just means that the resistor is not connected.

  • @YouTuber-xh1ej
    @YouTuber-xh1ej2 ай бұрын

    Thanks!!!!!

  • @TheBoredRobotLLC

    @TheBoredRobotLLC

    2 ай бұрын

    Happy to help

  • @Rickety3263
    @Rickety32636 ай бұрын

    0:57 is it just me or is pin 3 not connected to that resistor?

  • @TheBoredRobotLLC

    @TheBoredRobotLLC

    6 ай бұрын

    The camera isn't exactly right over the top, so the view might looked a bit skewed. It wouldn't have worked if they weren't connected. If you view in full screen on a monitor, you might be able to see that the resistor is connected to row 17, column b on the breadboard. The jumper to pin 3 is connected to row 17, column c on the breadboard.

  • @zzmysmn8955
    @zzmysmn89553 жыл бұрын

    awesome! I like the way how you explain it....

  • @TheBoredRobotLLC

    @TheBoredRobotLLC

    3 жыл бұрын

    Thank you!

  • @LionalLinde
    @LionalLinde Жыл бұрын

    hi thanks for the lesson, I am getting the following message ................... exit status 1 expected ',' or ';' before 'Serial' ..................... I am not able to see the code so do u have the code available for copy and paste? thanks L

  • @TheBoredRobotLLC

    @TheBoredRobotLLC

    Жыл бұрын

    Here's a direct link with the code: github.com/TheBoredRobot/Arduino-Examples/blob/master/Digital_Input.ino

  • @LionalLinde

    @LionalLinde

    Жыл бұрын

    @@TheBoredRobotLLC thank you again. can you do coding for me?

  • @TheBoredRobotLLC

    @TheBoredRobotLLC

    Жыл бұрын

    @@LionalLinde I do offer consulting services. Feel free to contact me here: www.theboredrobot.com/contact

  • @xforney
    @xforney Жыл бұрын

    hard to read small fonts

  • @TheBoredRobotLLC

    @TheBoredRobotLLC

    Жыл бұрын

    Thank you for this feedback. This has been a complaint with my earlier videos. I have since made the change for the most recent videos. However, if you need to see the code for this particular video, there is a link to the blog entry in the description.

  • @xforney

    @xforney

    Жыл бұрын

    @@TheBoredRobotLLC Thanks, you have some great word on these subjects.

  • @NextGen_automation
    @NextGen_automation10 ай бұрын

    Arduino Uno Inbuilt pullup resistor no required external pullup resistor

  • @TheBoredRobotLLC

    @TheBoredRobotLLC

    10 ай бұрын

    Yes, that's exactly correct. I was trying to demonstrate that point exactly but showing it with the resistor and by using the built in resistor.

  • @raijinmaru6463
    @raijinmaru6463 Жыл бұрын

    Very good , thanks it really helped but waaaay TOO FAST!

  • @TheBoredRobotLLC

    @TheBoredRobotLLC

    Жыл бұрын

    Thank you. I have received similar feedback regarding pace. More recent videos have been slowed down a bit.

  • @RASHNAD
    @RASHNAD2 жыл бұрын

    very good explanation, but you put the pull-up resistor in the wrong hole

  • @TheBoredRobotLLC

    @TheBoredRobotLLC

    2 жыл бұрын

    I'm not so sure it's in the wrong location. I do believe it's connected to the 5V rail and one end of the button. Maybe, the camera angle is making things difficult to see? If I am incorrect in any of this, I do welcome any corrections.

  • @HothamsApiary

    @HothamsApiary

    2 жыл бұрын

    @@TheBoredRobotLLC at first I thought you put in it the wrong spot as well, but I rewound the video and saw that it was right, there was just a weird shadow over the hole.

  • @andrewtitcombe8378
    @andrewtitcombe8378 Жыл бұрын

    Lets save a lot of time and just describe how to do this without the resistors.

  • @TheBoredRobotLLC

    @TheBoredRobotLLC

    Жыл бұрын

    Thanks for the comment. I do feel that the extra information might give some additional insight. However, you do bring up a good point. I will start including chapters to videos so that people can skip ahead easier.

  • @NextGen_automation

    @NextGen_automation

    10 ай бұрын

    No need external pullup resistor Arduino Uno has inbuilt pullup resistor

  • @natimulu8279
    @natimulu82793 жыл бұрын

    I dont get it yet. It becomes to complicated.

  • @TheBoredRobotLLC

    @TheBoredRobotLLC

    3 жыл бұрын

    Is there a specific part that you're struggling with?

  • @genesischain7153
    @genesischain71533 жыл бұрын

    Ba d oon .. 😠

  • @TheBoredRobotLLC

    @TheBoredRobotLLC

    3 жыл бұрын

    If there is something incorrect in this video, I'd love to hear about it.

  • @user-nv3sb5hr2f
    @user-nv3sb5hr2f2 ай бұрын

    thanks a lot

  • @TheBoredRobotLLC

    @TheBoredRobotLLC

    2 ай бұрын

    Glad it was helpful!

  • @dickbrock
    @dickbrock Жыл бұрын

    Thanks!

  • @TheBoredRobotLLC

    @TheBoredRobotLLC

    Жыл бұрын

    I'm glad you liked the video!