USE ONLY 1 PIN TO READ 4 BUTTONS (KC11B04 4X1 AD KEYPAD) - Arduino tutorial #29

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 ก.ย. 2024

ความคิดเห็น • 26

  • @PostalPete
    @PostalPete 3 หลายเดือนก่อน

    I watched a bunch of tutorials on this topic, and this is by far the most helpful.

    • @BasonTech
      @BasonTech  3 หลายเดือนก่อน

      Glad you like it! Thanks! 😃

  • @philipc8731
    @philipc8731 4 ปีที่แล้ว +1

    This video is brilliant, thank you so much for putting this up was totally lost when trying to figure out how this board!

    • @BasonTech
      @BasonTech  4 ปีที่แล้ว

      Great to hear I could help 😃

  • @Martin-dw4eo
    @Martin-dw4eo 3 ปีที่แล้ว

    Very helpful. I used this vid to create my own resistor-circuit with a joystick.

    • @BasonTech
      @BasonTech  3 ปีที่แล้ว +1

      Great! Good luck with your project! 😃

  • @phantom12321800
    @phantom12321800 10 หลายเดือนก่อน

    Very interesting. I was wondering how something like this works after looking at DFRobot's products. They use a single pin with buttons between the pin and ground, it must cycle somehow between output and input to get a reading of how much is going to ground. This is a handy method to do something similar with Arduino. Thanks!

    • @BasonTech
      @BasonTech  10 หลายเดือนก่อน

      You're welcome! 😃

  • @BasonTech
    @BasonTech  4 ปีที่แล้ว

    👉 Don't forget to check arduino-tutorials.net for more Arduino tutorials and projects.
    If you have questions, don't hesitate to ask them in de comments. Remember: There are no stupid questions 😃
    🔔 Want to stay up-to-date with the latest videos? Subscribe to the Bas on Tech channel!

  • @JiMake
    @JiMake 3 ปีที่แล้ว

    Very nice Sir,,,

    • @BasonTech
      @BasonTech  3 ปีที่แล้ว

      Thanks! 😃

  • @pablobinotto4424
    @pablobinotto4424 3 ปีที่แล้ว

    Brilliant explanation! Thank you.

    • @BasonTech
      @BasonTech  3 ปีที่แล้ว

      Thanks! 😃

  • @kijijikhalid601
    @kijijikhalid601 ปีที่แล้ว

    can we use just one button instead four ones, and we use buttonpressedcount++ to know witch one was pressed?

    • @BasonTech
      @BasonTech  ปีที่แล้ว

      Each button has its own resistance value so I guess this is not going to work.

  • @TrailMaker2
    @TrailMaker2 3 ปีที่แล้ว

    I get a bunch of numbers scrolling around, but when I press buttons it works but I don't have 0 on the beginning

    • @BasonTech
      @BasonTech  3 ปีที่แล้ว

      Sounds like a floating state. Perhaps a pull-down resistor is needed?

  • @ajentsong6151
    @ajentsong6151 2 ปีที่แล้ว

    can the return be letters instead of numbers?
    ex.
    if (adValue > 300 && adValue < 500)
    return UP;

    • @BasonTech
      @BasonTech  2 ปีที่แล้ว

      You can return whatever you want, as long as the code is still valid 😃

  • @calvinchien2
    @calvinchien2 2 ปีที่แล้ว

    what happens when 2+ buttons are pressed down at the same time?

    • @BasonTech
      @BasonTech  2 ปีที่แล้ว

      Good question! You get a combination output of their resistance. The downside of this is that the more buttons you press, the less range you have to determine which buttons are pressed. This makes the probability of detecting the wrong button getting higher.

  • @SamehAlKhalidi
    @SamehAlKhalidi 2 ปีที่แล้ว

    Can i make each bottom control relay

    • @BasonTech
      @BasonTech  2 ปีที่แล้ว

      Sure, they just act as normal buttons 😃

  • @computerjantje
    @computerjantje 4 ปีที่แล้ว

    This is a great video. This means I can use one cable for my four button camera zoom control. I only have to add some resistors to my button-case. It is going to be cramped in there but I think I will manage. Here you can see my camera rig with 'home build Arduino zoom controller': th-cam.com/video/Q199zLxkKXs/w-d-xo.html If you watch the video you will notice that one handle has a little case with four buttons. This is meant to be able to zoom in and out in two speeds. It is designed for two cable but as I in principle only use the slowest zoom, the two extra buttons are not really needed and although I created the four buttons and extra wire possibility, I never adjusted the Arduino or software for handling 4 buttons. With your trick I am going to implement it after all. Thank you for the video.

    • @BasonTech
      @BasonTech  4 ปีที่แล้ว

      Great to hear my video helped you! Good luck with your project 😃

    • @computerjantje
      @computerjantje 4 ปีที่แล้ว

      @@BasonTech Dankjewel :)