Push Button and LED control with the Arduino

  Рет қаралды 333,521

Maker 101

Maker 101

Күн бұрын

Push Button and LED control with the Arduino board.
Required Hardware:
Arduino Board: amzn.to/2LZr6t4
Push Button: amzn.to/3k79Bnh
LED: amzn.to/3qxSs8O
220 ohm & 10K ohm Resistors: amzn.to/3jXMJXs & amzn.to/3bj2HY9
Jumper Wires: amzn.to/3bbBgzu
Breadboard: amzn.to/3qxLxwm
Recommended Items:
Use Your Muscles in Project - amzn.to/3wdL45C
37 Sensor & Module Packages - amzn.to/3m66WeQ
Try this Robot Arm - amzn.to/3fq8DCl
Best Resin 3D Printer - amzn.to/39tY8KB
Arduino Compatible Kits - bit.ly/2J2AFF7
Banggood Spring Sale - bit.ly/3slMbOn
Source Code: create.arduino...
Social Media
/ mertarduino
/ mertarduino

Пікірлер: 108
@maker101io
@maker101io 3 жыл бұрын
Source Code: create.arduino.cc/editor/mertarduinotech/6d296b6c-86ba-4ed8-88fe-736caeb47e86/preview Recommended Items: Use Your Muscles in Project - amzn.to/3wdL45C​ 37 Sensor & Module Packages - amzn.to/3m66WeQ​ Try this Robot Arm - amzn.to/3fq8DCl​ Best Resin 3D Printer - amzn.to/39tY8KB​ Arduino Compatible Kits - bit.ly/2J2AFF7​ Banggood Spring Sale - bit.ly/3slMbOn
@georgyandreev2797
@georgyandreev2797 6 жыл бұрын
const int LedPin = 2; const int buttonPin = 4; int buttonState = 0; void setup() { Serial.begin(9600); pinMode(LedPin, OUTPUT); pinMode(buttonPin, INPUT); } void loop() { buttonState = digitalRead(buttonPin); if (buttonState ==HIGH) { digitalWrite(LedPin, HIGH); Serial.println("LED ON +1"); } else { digitalWrite(LedPin, LOW); Serial.println("LED OFF -0"); } }
@samhl7853
@samhl7853 6 жыл бұрын
I am fairly new at using the arduino boards and every time I try to light up an LED it never works but this is the first time I managed to have a working LED project!!!!! I cannot express how proud I am of myself but it goes without saying that you definitely helped me step by step. I was getting discouraged but this simple project brought me on track thanks :)
@efanutz
@efanutz 2 жыл бұрын
man, i succed to burn up a arduino uno, becouse you don't show clear how the push button is inserted! was my fault that i follow your clip....next time put olso the electric diagram!
@jazrulhafez3369
@jazrulhafez3369 4 жыл бұрын
I have some questions 1) what is the different between ground beside pin 13 and ground on power as in 1:20? 2) how to determine suitable amount of resistor that I should use in the circuit? and thank you for posting this kind of video. I love it :D
@Secretcodrin
@Secretcodrin 6 жыл бұрын
buy a starter arduiono kit do the basic led try the basic button led set up the wires find an error struggle to find the error realise you put a 2 pin button check for 4 pin button realise you don't have a 4 pin button
@Littletsu
@Littletsu 5 жыл бұрын
sad
@michaela5586
@michaela5586 5 жыл бұрын
My starter kit came with the four pin button.
@mkbr-yt
@mkbr-yt 2 ай бұрын
why does it continuously print log message? It something wrong with the code? It doesn't make sense.
@Niicko_R
@Niicko_R 3 жыл бұрын
ty
@reymundoacerit6353
@reymundoacerit6353 2 жыл бұрын
Can you help me to my project this video I'm looking to my project but I want to add a timer and lcd on it
@paulvicgatt4383
@paulvicgatt4383 Жыл бұрын
Just a question: Is it possible to turn on the leds using steering buttons of my sim instead? Thanks
@albievids
@albievids 3 жыл бұрын
I'm new to this. Why do we connect a 10k resistor between switch and ground?
@TechieBaksh
@TechieBaksh 3 жыл бұрын
It's to avoid circuit when you press the switch. Giving 10k resistance to ground make then short circuit current very less..and your circuit will work perfectly!!
@christianmendoza9518
@christianmendoza9518 3 жыл бұрын
muy chafa
@HarpreetSingh-yo9ir
@HarpreetSingh-yo9ir 4 жыл бұрын
Hi there. I wanted to toggle two led's with one push button. (One led instantly on as soon the arduino gets on) . And then toggle the led's . Any guidance would be greatly appericiated :)
@helloworld9531
@helloworld9531 2 жыл бұрын
insetad of purple wire, which coloured wire can we use ??
@CarlosSantos-jf3cx
@CarlosSantos-jf3cx 4 жыл бұрын
Why some button setups do need 5v while others do not? The ones that do not need to connect to 5V has one side connects to GNP and the other side connects to a pin for input
@colincostello1630
@colincostello1630 4 жыл бұрын
OMG! THIS WAS SOO EASY THANK YOU!!!
@lushann5018
@lushann5018 3 жыл бұрын
Been looking for a video that works and FINALLY found yours. Thank you!
@othmaneoubrik668
@othmaneoubrik668 4 жыл бұрын
can someone send me the code. the two links of the video arent working
@ProgrammerSheep
@ProgrammerSheep 6 жыл бұрын
omg. Finally a video that I understand!!!!!!!
@baldaiomir
@baldaiomir 3 жыл бұрын
wait i have a problem.. what if the led is alredy glowing(BUT its not in full capacity), and when i push the button the led starts glowing fully. how can i fix this or where did i made a mistake??...
@sbx369
@sbx369 4 жыл бұрын
Just headache watching it
@harshchaturvedi4218
@harshchaturvedi4218 5 жыл бұрын
hey i just noticed u too have a Arduino clone and not the original. This is the same i bought (by mistake) from online store. Just wanted to ask you if it works just fine or have some drawbacks? *PLEASE REPLY, I AM SO SAD ABOUT THIS.*
@ferruxmemmedov3157
@ferruxmemmedov3157 5 жыл бұрын
It's okay.There are no big differences.
@TechieBaksh
@TechieBaksh 5 жыл бұрын
Don't be sad..!! Clones are just low quality versions..!! Everything works fine as Original board..!! But Original is so lovely...!! 😊
@skyenayeon5492
@skyenayeon5492 4 жыл бұрын
Im here because i wont probably understand my teacher when she teach us this😭
@FranzFakler
@FranzFakler 4 жыл бұрын
Many times that background noise when You try to look at a video. Better try to make a comment. At least not that noise
@kvlpnd
@kvlpnd 7 жыл бұрын
Good video. I technically suggest to remove an error in programming. It should just show at the instant of turning on/off led on serial monitor instead of constant messages. This could be achieved by little change in programming ofcourse. Good luck.
@kvlpnd
@kvlpnd 7 жыл бұрын
+Mert Arduino Tutorial & Projects Good luck
@ruzainimohdnawi1910
@ruzainimohdnawi1910 7 жыл бұрын
can i have the codes ?
@raffayshahid6304
@raffayshahid6304 3 жыл бұрын
Compulsory to use the red LED? 0:16
@TechieBaksh
@TechieBaksh 3 жыл бұрын
Any color LED you can use.!!❤️
@raffayshahid6304
@raffayshahid6304 3 жыл бұрын
@@TechieBaksh Ty🌅
@tomboy1692
@tomboy1692 4 жыл бұрын
it says the "expected unqualified-id before 'if'
@ArsenicPlayz
@ArsenicPlayz 4 жыл бұрын
it says that for me but for else
@Epic_stickman90
@Epic_stickman90 9 ай бұрын
the cable management: 🤩
@ketanmistry4285
@ketanmistry4285 4 жыл бұрын
One time while u push the button it shold be contionous on....dont be stop..while u put second button it should be stop...make that kind of video
@JJGreviews
@JJGreviews 3 жыл бұрын
Finally, thought it would be so easy but the config of the push button was confusing me, your video helped me to get it right, thanks
@nayab06019
@nayab06019 3 жыл бұрын
this is amazing but i want a push button press on time the led alwasy on and next push led off and stay off plz one video on it thanks to you
@MinecraftXXXXL
@MinecraftXXXXL 5 жыл бұрын
You can also use internal pull up resitor or pull down
@CrushOfSiel
@CrushOfSiel 5 жыл бұрын
So there are two completely separate circuits? It isn't like a single circuit being 'completed' when the button is pushed it is actually the software 'realizing' the button is pushed and then telling the led to light?
@peterparker431
@peterparker431 3 жыл бұрын
I've watched a lot of push-button-to-control-led videos, this is the only one that worked for me. Thanks!
@gurushiyasp6271
@gurushiyasp6271 Жыл бұрын
Ayyo nandri dhevaime
@Blazekill2206
@Blazekill2206 6 жыл бұрын
Does it matter where I put the led on the breadboard?
@itamar9764
@itamar9764 6 жыл бұрын
NO
@panzerr4627
@panzerr4627 3 жыл бұрын
why my led has a delay, if i press it and release, it will wait 1 second before the led turns off, i didn't put a delay in the script
@cordellbrooks6365
@cordellbrooks6365 7 жыл бұрын
does their have to be a resistor on the button
@marwansamy2
@marwansamy2 5 жыл бұрын
yes otherwise the led will be half lit all the time
@izimalta
@izimalta 6 жыл бұрын
why do you need a resistor with the switch? thanks
@TechieBaksh
@TechieBaksh 5 жыл бұрын
To avoid short circuit ..!! As you forcefully turn the input pin to 5V or 0V it creates a short circuit and can damage your ardiuno board.
@jumbo999614
@jumbo999614 5 жыл бұрын
So it depends on where yellow wire(input) line up with right? Let say if it lines up with positive, it will read HIGH(push button to turn off) If it lines up with ground it will read LOW(push button to turn on). Is my understanding correct?
@bestamerica
@bestamerica 5 жыл бұрын
' better use quiet silent push tactile switch... not like noise sound click click
@valizeth4073
@valizeth4073 4 жыл бұрын
Consider using static constexpr, instead of a regular const.
@hhyyhhhhyyhh8874
@hhyyhhhhyyhh8874 4 жыл бұрын
Kendi videon yokmu hacı
@quinstermyer
@quinstermyer 7 жыл бұрын
At 2:13 can you explain why the top leg? What would happen if you connected the wire to the bottom pin, two slots to the left?
@Muzalik
@Muzalik 5 жыл бұрын
I does not work at all,I tried it by plugging out and in, and even removing the resistors,please fix this or I will have to unsubscribe, because I need a channel I can trust to have the right information.
@RuzGaming
@RuzGaming 5 жыл бұрын
try checking if your port is correct or your code or your wiring instead of blaming it. Illiterate shit
@finn9000
@finn9000 5 жыл бұрын
@@RuzGaming get a fucking life
@howardtang8720
@howardtang8720 5 жыл бұрын
Why do you have to add the ground to the button? When you do not push the button it will read zero, but when you do there are both 5v and gnd running through the arduino so what does the arduino read?
@TechieBaksh
@TechieBaksh 5 жыл бұрын
it will read 5V :)
@luzromero6777
@luzromero6777 6 жыл бұрын
mostra como compilas !!! USO EL MISMO CODIGO Y NO FUNCIONA.
@wvoyles
@wvoyles 3 жыл бұрын
why
@Beautiful_Quran_Reader
@Beautiful_Quran_Reader 3 жыл бұрын
IT WORKED I AM GLADE AND SO HAPPY
@ragaen3698
@ragaen3698 5 жыл бұрын
Arduinosuz da yapilabilir
@abdullahjhatial2614
@abdullahjhatial2614 4 жыл бұрын
sir puch switch k sath resistor q lagaya ha??
@danijumpmtb
@danijumpmtb 6 жыл бұрын
Gostaria de fazer uma pergunta fora do contexto do vídeo, tenho uma plaquinha eletrônica de um fliperama que usa esse micro botão tátil para ligar a tela, só que eu gostaria de colocar esse botão com acionamento externo só que a madeira que uso é de 15mm aí toda vez que eu preciso ligar/desligar tenho que abrir por trás e apertar o botão, eu queria tipo uma capa para eu furar a madeira e colocar para acionar o botão por fora sem ter que abrir esse gabinete. Obs: não manjo nada de solda.
@ravenborda6712
@ravenborda6712 6 жыл бұрын
How can i include an ldr in this programm?
@marwansamy2
@marwansamy2 5 жыл бұрын
Add an ldr on the breadboard, connect it with a resistor to ground, another ldr pin with positive, in between the ldr and resistor put an arduino pin into the analog pins and type in the program if(ldr==###) //### the numbers which you want the ldr to light up the led then which usually ranges between 150 to 900 depending on the ldr you are using and the light intensity then { digitalWrite(Led, HIGH); //this for led directly, if you want it for the button then you have to insert an extra variable to turn on the button } else{ digitalWrite(Led, LOW); }
@alancordeiro3491
@alancordeiro3491 5 жыл бұрын
Thanks! Straight to the point.
@dispersonhere2084
@dispersonhere2084 4 жыл бұрын
why doesnt this work for me?
@cordellbrooks6365
@cordellbrooks6365 7 жыл бұрын
does their have to be a resistor on the button
@YuTonyGraceRevolution
@YuTonyGraceRevolution 7 жыл бұрын
Dear Mert, thankyou for you wonderful video!! can you please give me advice on how I can connect an 10W Led with 12V Led Driver Directly onto Arduino board? i tried to do it, but it didnt work... Thankyou :-)
@YuTonyGraceRevolution
@YuTonyGraceRevolution 7 жыл бұрын
Hell Mert, thankyou for your reply and help; this is the 12v led driver here: Driver Input Voltage: 12-24V DC Output Voltage: 9-12V Output Current: 900mA+-5% can support 10pcs high power 10W led 3 in serial and 3 in parallelwww.ebay.com/itm/331653946252?_trksid=p2057872.m2749.l2649&var=540791276919&ssPageName=STRK%3AMEBIDX%3AIT Thanks :-)
@any123-og
@any123-og 4 жыл бұрын
you can use a relay or a mosfet
@nkgowda9933
@nkgowda9933 5 жыл бұрын
Hey how to intialize timer and when i press the pushbutton that read time and display how it read time please explain me
@أروىعلاء-م6و
@أروىعلاء-م6و 7 жыл бұрын
Why have you written serial.begin(9600) ? What does that mean ?
@ajayjoseph4626
@ajayjoseph4626 6 жыл бұрын
it is just for troubleshooting. Serial.print() wont work without declaring serial.begin()
@nirajtech8129
@nirajtech8129 6 жыл бұрын
its usb port to get know which serial starting from 9600 bits per second
@abelnohpalbriones5631
@abelnohpalbriones5631 6 жыл бұрын
Thank you very much from Mexico. Yours videos are amazing.
@abhiramivenugopal9868
@abhiramivenugopal9868 3 жыл бұрын
worked, thank u!
@doki4229
@doki4229 4 жыл бұрын
HÁT HOLAAFASZOMBA VAN A KÓD????
@MichaelAbebreseAgyeman
@MichaelAbebreseAgyeman 5 жыл бұрын
too much wiring...
@LaggingBleach
@LaggingBleach 4 жыл бұрын
My arduino turns off instead
@aiversity5975
@aiversity5975 4 жыл бұрын
When you press the button, the 5v and GND connect and arduino switches off. Check the connections again
@luxguttcraft3162
@luxguttcraft3162 5 жыл бұрын
when i push the button my arduino restarts
@seybird
@seybird 5 жыл бұрын
this means you did wrong wiring
@TechieBaksh
@TechieBaksh 5 жыл бұрын
You might have not connected the resistor with your push button or might have connected wrongly.Due to which when you press the button, +ve and -ve supply gets short circuited and your arduino gets restarted. Check it :)
@killar222
@killar222 7 жыл бұрын
Very helpful - thanks!
@MsYoyojam
@MsYoyojam 7 жыл бұрын
Thank you! This worked for me.
@FilingShown
@FilingShown 4 жыл бұрын
you save my life
@astroid9087
@astroid9087 5 жыл бұрын
Nice music
@campbell1671
@campbell1671 6 жыл бұрын
Patrick is a mecha
@EngSultanYIC
@EngSultanYIC 6 жыл бұрын
Works properly! Thanks
@fajatoi
@fajatoi 6 жыл бұрын
i want to control 5 led with five buttons....can you make it?
@bryankim5595
@bryankim5595 5 жыл бұрын
Yes simply make another 5 set of those but the - shoulde be alll together
@anakajaib9350
@anakajaib9350 7 жыл бұрын
Nice Blog :)
@kaiser3131
@kaiser3131 5 жыл бұрын
lllllllllllllllllllllllllllllllllllllllllllaaaaaaaaaaaaaaaaaaaammmmmmmmmmmmmmmeeeeeeeeeeeeeeeeeee
@mishota_8437
@mishota_8437 6 жыл бұрын
well mine blinks too
@Osmanity
@Osmanity 7 жыл бұрын
Hey nice video but my led lamp does not turn off when i not press the buttom insted it blinks, why?
@josephmazzulla646
@josephmazzulla646 7 жыл бұрын
movement too fast
@josephmazzulla646
@josephmazzulla646 7 жыл бұрын
movements too fast
@mashrafi_m
@mashrafi_m 7 жыл бұрын
Try slowing it down from the settings
@jamiemacarthur2420
@jamiemacarthur2420 6 жыл бұрын
dont watch , cant see where this guy puts the wirers or anything
@SchwanaCARDHUT
@SchwanaCARDHUT 4 жыл бұрын
thank U very mach but I Think that when U are initialized the push button after the slash it must write INPUT like that ......// initialize the push button as an INPUT
You can learn Arduino in 15 minutes.
16:34
Afrotechmods
Рет қаралды 10 МЛН
Fun with Transistors
24:33
HackMakeMod
Рет қаралды 337 М.
Minecraft Creeper Family is back! #minecraft #funny #memes
00:26
Bike Vs Tricycle Fast Challenge
00:43
Russo
Рет қаралды 102 МЛН
How to Control a 12V Motor with Arduino: Easy Wiring & Code Examples
44:13
What's the difference? Arduino vs Raspberry Pi
6:21
Tinkernut
Рет қаралды 1,8 МЛН
Top 20 Arduino Projects | Arduino project compilation
24:55
Mr Innovative
Рет қаралды 951 М.
Arduino Basics 102: Control Structures, Variables, Interrupts
7:38
Arduino Basics Handling Multiple States
10:35
learnelectronics
Рет қаралды 120 М.
8x8x8 LED CUBE WITH ARDUINO UNO
6:46
HARRY LE
Рет қаралды 15 МЛН
Big Stepper Motors with Arduino
29:43
DroneBot Workshop
Рет қаралды 1,2 МЛН
Arduino Tutorials: Control a LED with a Button
8:14
HackTheWorld
Рет қаралды 405 М.