Arduino for Beginners: Using Push button to turn ON LED light
Вставка
- Опубліковано 9 лют 2025
- This is absolute beginners Arduino tutorial showing how to use push button to turn ON an LED light.
Download the code:
robojax.com/lea...
Get standard 10pcs PCBs for free
robojax.com/L/?...
See example of H-Bridge project here • Building H-Bridge Moto...
The software used to draw tth diagram is a free program called Fritzing which you can get it from fritzing.org
Secrete Amazon Deals:
Visit and purchase via my Amazon Store: amzn.to/3zL00id this will help me. thank you
Tutorial by Ahmad Shamshiri form Canada
****************************
Get early access to my videos via Patreon and have your name mentioned at end of very videos I publish on UA-cam here: robojax.com/L/?... (watch until end of this video to list of my Patrons)
****************************
If you found this tutorial helpful, please support me so I can continue creating contents like this. Here is PayPal link paypal.me/robo...
If you want to learn Arduino from proven instructor on **Udemy**: bit.ly/rj-udemy
Follow me on Facebook robojaxTV
Follow me on Twitter: / robojaxtv
Follow me on Instagram: / robojax
Tutorial by Robojax.com
Get other projects code and learn Arduino
robojax.com/lea...
#robojax #robojax_push_button
I have watched some other tutorials of different aspects but this one was the easiest you just earned yourself a Sub!
Thanks for subbing. Then you must whatch this video to know why you must user a resistors with the push buttons ua-cam.com/video/TTqoKcpIWkQ/v-deo.html
Great tutorial! Thanks. I've watched a bunch for leds, buttons, and this one was by far the easiest to follow and provided the best results. I swapped out hard coding pin numbers for variables declared at the beginning (int BUTTON = #; and int LED = #;), but otherwise, followed it exactly and got the intended results.
You are welcome.
Watching 1 tutorial is less boring compared to 12 years of education
thank you very much! you just helped me finished my assignment!
This is extremely helpful! I'm just getting into arduino and you explaining the hardware AND programing is awesome! I'm watching through your other videos now. One question I do have, is how do you determine which resistor to use for the LED? What would happen if you try to run without the resistor, would it fry the LED, or arduino, or even both? Thanks :)
You are welcome. I have a video exactly explaining how to calculate resistor value for LED here ua-cam.com/video/x2YxfV1L02Y/v-deo.html
3:56
the software you use to connect the cables
I watched the video and it has been mentioned in the video (watch it again). I just added the link in the description.
Tried to add this to an already existing project, but it doesn't seem to work, so I'm probably doing something wrong. So far, I used an ultrasonic sensor and a micro servo to open a door. I'm trying to add this led which lights up when I press a button. When it's lit up, I want a buzzer to make a sound whenever someone tries to open the door, and when it's not lit up, the door opens normally. Problem is: nothing happens to my led.
when you combine two codes into one, pay attention to pin definition. for example in your first project if pin 3 is used, then when adding second project, you can use the same pin3. use different pin and pay attention toi variables. if you are not getting erro, then it means either pin difination (pinMode(13, INPUT)) have conflect or wrong or wiring is incorrect. Make sure you to test them separately and they work before combining them. good luck
أهلاً وسهلاً ومرحباً بك-يتعذر التعليق-لا أعلم .
Awesome 👌
hey mate good video but my led is constantly on and the pushing the switch does nothing..any ideas?
check your wiring. Make sure you copy the code and past it into arduino. It should work.
Thanks buddy
Can you please show how to do this using Proteus
The software you mentioned is never used in any industry or educational institutions. It is very expensive and just for rich people. We are here to support ordinary people. Like free software
Can U tell me how to switch it on automatically with just the program and no manual work required?
so you want the LED to turn ON and OFF?It is called blink. Very simple. On Arduino program click on File->Examples-Basic-Blink and you have that.
Grt work sir..
Thank you Sir.
it doesn't work. I followed the video precisely...
doesn't work is not enough. what do you see? if error, then please provide. explain so I can help you.
Thank you Sir!
You are welcome.
thanks
You are welcome. Thank you for not skipping the ads and keep watching them. This will help me a lot.
hi sir can you make a LED Blinking If the push button pressed ..If the button pressed again the LED Stop Blinking..pls. tnx..
Interesting project. I just add it to my list. i will make video God willing. It needs writing and experimenting.
Many thanks
I have a text file stored in sd memory as follows, it consists of three columns
0'10,0
10,0,0
0,0,10
0,0,0
10,0,0
..
I have three LEDs connected to three terminals (pins) of the Arduino, for example 7,8,9
How do I get a code that enables the Arduino UNO to read the text file and convert each number 10 to 5 volts on one of the three pins
Thus, it will light three LEDs sequentially according to the data stored in the SD card memory. Thank you very much
Hello, I have a full tutorial on MicroSD card module here ua-cam.com/video/TduSOX6CMr4/v-deo.html which is free. but if you want custom code, I will do it if you compensate my time. I will charge $100 for this. if you are interested, please contact me via robojax.com contact page.
Thanks very much :)
you are welcome.
can u do this without a breadboard?
yes you can solder the wires and do it. breadboard is just holding it and making it easy.
My LED just wont stop constantly glowing I followed the tutorial step by step. Anybody know why?
I assume you took the code from the resource page here robojax.com/learn/arduino/?vid=robojax-pushButton if so, then the the pin 2 is always LOW to turn ON the LED. then it means your push button has 4 wires and you gotta rotate it 90 degrees so the correct pins are in place. Good luck. try and reply .
@@robojax Oh my gosh rotating it worked. I've literally followed so many tutorials on this and couldn't figure out why it was constantly emitting light. Thank you so much!!
You are welcome. I am glad it worked.
if you get the long two pin type push button, you won't make mistake www.amazon.ca/dp/B0BBPZ2TYD?th=1
i did everything, and it does not work!!!! Please help robojax!!!!
you must have escaped. Please watch the video fully without escaping. I can assure you it will work if you have the components.
it doesnt work for me :(((
You must be doing something wrong. Watch the video again. Do not fast forward. Watch everything.
than your board must be dead or fried
I have 6pins haha