How to use up to 10 push button switch with 1 Arduino input pin ANPB-V1

  Рет қаралды 17,033

Robojax

Robojax

Күн бұрын

Пікірлер: 80
@HAMMER_2.2
@HAMMER_2.2 Жыл бұрын
You are AMAZING! Thank you for this video! I want to use this to make some custom steering wheel buttons that control relays for several accessories. However, I can only pass 2 wires through my steering wheel clockspring. I can feed my 5v signal and output wires through the clockspring, and get ground inside the steering wheel hub as it is grounded already and where the horn button is grounded. This will come in perfectly and will be my first time using Arduino. I will study up very good now. Thanks again friend!
@OcenaSoft
@OcenaSoft 4 жыл бұрын
Amazing - yet again another very detailed explanation. I had managed to do this but it was a mess. I have learnt a lot from your code and method of programming. Thanks.
@robojax
@robojax 4 жыл бұрын
Great to hear!
@1malditoPerro
@1malditoPerro 2 жыл бұрын
Thank you. I've been looking for a video like this. I'm interested in extending a button's functionality by long press, double-tap, and maybe double-tap-hold. I know the combinations are many but at least get 3 buttons out of one would be great. Like some handsfree headphones have a single button to take care of prev track(triple-tap, I think),(single-tap) toggle play, next track(double-tap,I think), stop (single-tap toggle), and call/voice command (long press)
@ohmslaw6856
@ohmslaw6856 3 жыл бұрын
Very smart idea.. ladder switching
@jeffvenqueleir2036
@jeffvenqueleir2036 4 жыл бұрын
Nice tutorial learn again a little more from you
@robojax
@robojax 4 жыл бұрын
Thank you! Cheers!
@IGaming73
@IGaming73 6 ай бұрын
Is it possible to register multiple buttons presses at the same time with this method ?
@robojax
@robojax 6 ай бұрын
If you want to read the value bar the same time then you need to use multiple inputs of arduino.
@TheRainHarvester
@TheRainHarvester 4 жыл бұрын
30:00 button#6 's lower value is lower than #5's higher value. You may have an int that snuck into the calculations. This is a great way to add more buttons. I forgot about this long ago. But I'm glad you reminded me!! You won't be able to press more than 1 button at a time, but if you add resistors and more buttons, you won't need to! I'm trying to figure if voltage sag (batteries going lower) would affect the buttons. Vref should stay the same, but actual voltage on the ladder might decrease.
@robojax
@robojax 4 жыл бұрын
Yes you are right. then in that case we will have to set the tolerance to 1% of 5% to increase the gap between voltages. I will try to mention this somewhere or may be update the video. Please comment as I will delete this video and update it with relay as it seems many people did not see how it is used even though I've shown it can turn on digital outputs.
@TheRainHarvester
@TheRainHarvester 4 жыл бұрын
@@robojax oh no don't delete this video. The discussion is a great place for people to always learn more! In fact, I find, doing something non perfect in a video generates even more great discussion than a perfect video. (And better info in the end). Great video!!
@skmusicworld3923
@skmusicworld3923 2 жыл бұрын
Sir how to to control multiple outputs at a one time using this idea
@palot18
@palot18 4 жыл бұрын
I would like to see long distance rs485 remote control relay use key board 4x4 master and sleeve arduino.
@robojax
@robojax 4 жыл бұрын
it is on my list. When time permits. God willing I'll make it. But it is at the bottom of the list.
@nawinlifehacks9978
@nawinlifehacks9978 4 жыл бұрын
Nice tutorial...👍👍👍 Please do same project with relays.thank you
@robojax
@robojax 4 жыл бұрын
this is for relay. Already incorporated. I did not feel the need to connect relay. the code is already included controlling relay.
@nawinlifehacks9978
@nawinlifehacks9978 4 жыл бұрын
@@robojax oh ok thank you ☺️
@amrishhirani6096
@amrishhirani6096 4 жыл бұрын
Brilliant idea thanks ❤️
@robojax
@robojax 4 жыл бұрын
You’re welcome 😊
@rejeanbazinet3844
@rejeanbazinet3844 Жыл бұрын
Hi, will this work with 12 buttons with an ESP32 ? Thank's and keep up the good work !!!
@yamanidemabildo9724
@yamanidemabildo9724 3 жыл бұрын
hello sir ahmad... thanks for this informative video it gives me a lot of ideas as a beginner... i would like to ask if you could make a video on 6 pushbutton to control one servo motor.. each button have different programs for the servo to perform.. thank you sir...
@robojax
@robojax 3 жыл бұрын
Hello, just search my channel and I am sure you will find something. You will be surprised.
@electronic7979
@electronic7979 4 жыл бұрын
👏👏👏
@robojax
@robojax 4 жыл бұрын
👍 👍
@piercer4882
@piercer4882 4 жыл бұрын
Great idea and great explanation! We live in the same region, do you know of any good courses you would recommend for arduino programming?
@robojax
@robojax 4 жыл бұрын
Hello, here is my Arduino course on Udemy from absolute beginner to complicated projects bit.ly/rj-udemy
@TheRainHarvester
@TheRainHarvester 4 жыл бұрын
15:50 you should use a define instead of ...oh you beat me to it.
@robojax
@robojax 4 жыл бұрын
Yes indeed "define" was better option. I am going to remove this video and update it with controlling relay as it helps many people to see the result. it seems this was not enough as how it is used.
@DoTheDiy
@DoTheDiy 4 жыл бұрын
Better approach is to use 2 pins one analog and one external interrupt and using a transistor send signal to interrupt pin. With this no polling is needed
@robojax
@robojax 4 жыл бұрын
this is the easiest. In my opinion. one resistor for each push button.
@elmermandiade7309
@elmermandiade7309 2 жыл бұрын
Thanks for this great info., but my micro controller is esp32...will this works?
@robojax
@robojax 2 жыл бұрын
See the principal of reading voltage with esp32 from this video kzbin.info/www/bejne/eYDWpIqkabWWo5Y
@conradsinsua7415
@conradsinsua7415 4 жыл бұрын
MCP2515 CAN BUS can you do a tutorial on this?
@robojax
@robojax 4 жыл бұрын
Hello, I have added into my "to do list". Thanks for letting me know. I removed the video to update and posted with relay. Once the V2 of this video was posted, I brought back the V1 (this video).
@josedetena7640
@josedetena7640 2 жыл бұрын
hola Ahmad En primer lugar darte las gracias por tus videos y la forma tan didáctica de explicarlos para los que no entendemos. Mi pregunta puede funcionar con 32 pulsadores para dos módulos de 16 relés con resistencia de 1K y final de 400K gracias por anticipado un saludo hello ahmad First of all, thank you for your videos and the educational way of explaining them for those of us who do not understand. My question can work with 32 pushbuttons for two modules of 16 relays with resistance of 1K and final of 400K Thanks in advance a greeting
@robojax
@robojax 2 жыл бұрын
Hello, you are welcome. there is V2 of this video which shows relay control. the link is in the description. I have explained it and shown what the problem is. The more resistor you put the more error you will have. so I believe 10 seems maximum for one arduino. why don't you use keypad? here 4x4 keypad with 5 wires kzbin.info/www/bejne/p3qnq619Z7GIqsk or 4x5 keypad kzbin.info/www/bejne/qZO0ZHdnlN2Sqsk search my channel for more. Here is how to find Specific KZbin Video in a channel bit.ly/findKZbinVideo or 8 channel relay kzbin.info/www/bejne/mpyohIqmmal1j80
@GuilhermedaSilvaCaetano0095
@GuilhermedaSilvaCaetano0095 7 ай бұрын
Hello, if I put 14 push-buttons in one code and 2 push-buttons in the other code to turn on a led, what will it look like? Can you help me, if it works, send the code to Arduino
@robojax
@robojax 7 ай бұрын
This video is for learning. Please watch and learn. I have three full course if you want to learn certain or all topics. Just click on Robojax logo under the video and look at the playlists.
@Dijoboo
@Dijoboo 3 ай бұрын
i have a question, how can i make it so if i press a button it make a spesifice note sound?
@robojax
@robojax 3 ай бұрын
It has two alerts , first condition and second playing tone. Here is video on the condition Lesson 08: Arduino Conditional Statements | Arduino Step By Step Course kzbin.info/www/bejne/g5zcXmNqg62SebM and here is how you can generate tone ESP32 Tutorial 14 - Playing Custom Music Note Using SunFounder ESP32 IoT Learning kit kzbin.info/www/bejne/Znqpc3R8a8yGd9E and generating tone ESP32 Tutorial 14 - Playing Custom Music Note Using SunFounder ESP32 IoT Learning kit kzbin.info/www/bejne/Znqpc3R8a8yGd9E
@brucewoods9377
@brucewoods9377 2 жыл бұрын
The code on your site will not compile Line 66 “voltage_minimum” not defined Line 77 “ ‘else’ without previous ‘if’ “
@robojax
@robojax 2 жыл бұрын
Hello, thank you for letting me know. We've migrated our website to new Content Management System and used automated data transfer. this process have missed up some of the pages. I just fixed this manually. this should work now. Please let me know.
@robojax
@robojax 2 жыл бұрын
Here is Version 2 of this video: Control 10 output pins or relay using 10 push button switch with 1 Arduino input pin ANPB-V2 kzbin.info/www/bejne/d3qQq62jiL-JnNk
@rimavlis9629
@rimavlis9629 2 жыл бұрын
hello, is there a way to cancel the channels except one, if multiple buttons are pressed, keeping all resistors output?
@robojax
@robojax 2 жыл бұрын
Hello, do you want not use other resistors? (1) or when it one key is pressed, you want the others to be deactivated?(2), 1-you can used 2 or more, (2) then how are you going to implement it? as long as a key is pressed, it should not accept other key-press.? if so you need to use conditional statement to check that. It needs some work.
@maxlindstrom5435
@maxlindstrom5435 4 жыл бұрын
Hi, I would like to know how to use a Keypad (4x4) with I2C to set 16 outputs on a PCF8575. I would like to use PCF8574 for the keypad and for a display (2x16) with PCF8574 on the same I2C bus line. Read from Keypad, show on display and action on PCF 8575 to set the corresponding output. That should be a nice project for you to handle a lots of outputs, from one keypad with a minimum of wiring. I use Arduino NANO so it will be as cheap as possible. Thank you in advance!
@robojax
@robojax 4 жыл бұрын
Hi, Yes indeed it is very interesting project. I just added it to my "to do list".
@aarontaylor7150
@aarontaylor7150 3 жыл бұрын
Hi Robojax can this be done with vibration sensors instead of push button?
@robojax
@robojax 3 жыл бұрын
It just needs connection ground . If your sensor can bring the connection to GNS level or zero volts, it should work
@aarontaylor7150
@aarontaylor7150 3 жыл бұрын
@@robojax What is GNS?
@robojax
@robojax 3 жыл бұрын
Sorry 😂 typo , GND
@glenngarrett8785
@glenngarrett8785 4 жыл бұрын
I don't see the code on your website - have you not uploaded it yet?
@robojax
@robojax 4 жыл бұрын
OMG. thank you for letting me know. so much to do for a video and I forgot it. Just activated the link.
@FindLiberty
@FindLiberty 4 жыл бұрын
@@robojax should be 341 not 292
@Adams456
@Adams456 2 жыл бұрын
Using 2 ports with the same concept can we have 20 buttons?
@robojax
@robojax 2 жыл бұрын
Yes the same methods can apply to all analog pins to get more push buttons inputs
@Adams456
@Adams456 2 жыл бұрын
@@robojax thanks so much!
@stlo0309
@stlo0309 4 жыл бұрын
Thanks a lot!
@robojax
@robojax 4 жыл бұрын
You're welcome!
@richardkleihorst1304
@richardkleihorst1304 4 жыл бұрын
why do you put r5 and not leave it out and make r99 smaller. In that way you save power.
@robojax
@robojax 4 жыл бұрын
didn't get it? r99?
@richardkleihorst1304
@richardkleihorst1304 2 жыл бұрын
@@robojax at 3:19 if you remove r5 from the schematic, you do not have the constant power draw by 5kOhm. Then make r99 (at the IC) smaller in value to get the correct voltage drop if you press a button.
@Adams456
@Adams456 2 жыл бұрын
Works with arduino micro?
@robojax
@robojax 2 жыл бұрын
Yes it will.
@NoOne.--_.--..._--_..l--l
@NoOne.--_.--..._--_..l--l Жыл бұрын
Can I do 12 push buttons in one pin ?
@robojax
@robojax Жыл бұрын
Please watch as I have answered that question
@mani5004
@mani5004 8 ай бұрын
but it cant be used for latching switches
@robojax
@robojax 8 ай бұрын
I am having problem with word latch in this context.
@zakaryaafa702
@zakaryaafa702 4 жыл бұрын
ty man
@robojax
@robojax 4 жыл бұрын
You are welcome.
@warrior7740
@warrior7740 9 ай бұрын
More simple way can can handle this. No need write biggest code
@robojax
@robojax 9 ай бұрын
Please share here. Just make sure to use one input pin. 📍
@kkelectronics831
@kkelectronics831 4 жыл бұрын
Hi sir how to use it as a switch?
@kkelectronics831
@kkelectronics831 4 жыл бұрын
As a on off switch?
@robojax
@robojax 4 жыл бұрын
Hi, video will be updated demonstrating controlling relays.
Arduino Tutorial 28: Using a Pushbutton as a Toggle Switch
21:58
Paul McWhorter
Рет қаралды 297 М.
Amazing remote control#devil  #lilith #funny #shorts
00:30
Devil Lilith
Рет қаралды 16 МЛН
Players vs Pitch 🤯
00:26
LE FOOT EN VIDÉO
Рет қаралды 133 МЛН
The Singing Challenge #joker #Harriet Quinn
00:35
佐助与鸣人
Рет қаралды 44 МЛН
How to Use a Button with an Arduino (Lesson #5)
20:57
Science Buddies
Рет қаралды 98 М.
How to use millis() function to multitask in arduino code.
10:34
Mario's Ideas
Рет қаралды 62 М.
Servo Motor with Potentiometer and LCD with Arduino
25:17
Robojax
Рет қаралды 29 М.
The Future of Programming
9:30
ThePrimeTime
Рет қаралды 58 М.
LED + Button = LEDBUTTON (Arduino tutorial)
25:07
upir
Рет қаралды 8 М.
Arduino Tutorial 34: Simplest Way to Use a Pushbutton Switch
10:26
Paul McWhorter
Рет қаралды 102 М.
Arduino Basics 102: Control Structures, Variables, Interrupts
7:38
How connect multiple switches to one pin, Arduino?
17:26
MEC DER
Рет қаралды 18 М.
Amazing remote control#devil  #lilith #funny #shorts
00:30
Devil Lilith
Рет қаралды 16 МЛН