Arduino Tutorials: Control a LED with a Button

  Рет қаралды 408,420

HackTheWorld

HackTheWorld

Күн бұрын

Пікірлер: 242
@glebdubs
@glebdubs 5 жыл бұрын
You saved a project for which I worked for hours on - thank you so much! The fact that this video includes EVERY SINGLE LITTLE DETAIL that a lot of KZbinrs miss out is amazing, and that's what saved me hours of work! THANK YOU!
@pimentomori259
@pimentomori259 11 ай бұрын
thank you so much, im just starting out with coding and my computer teacher is useless, taught me more here than half the semester has
@Ali_Alhakeem
@Ali_Alhakeem 9 ай бұрын
Ok this was really helpful , figured out i didn't use resistor and it works now thank you !
@catacutanroselynb.5632
@catacutanroselynb.5632 Жыл бұрын
Thank you so much. This is the easiest and understandable demonstration video here in KZbin.❤
@electronix6898
@electronix6898 5 жыл бұрын
Mine worked fine. Now, I need to figure out how to put 3 LEDs in there and control them with 3 different buttons. I'm trying to work on a cool little game where I put in a random pattern of 3 flashing LEDs and you have to remember the pattern and press buttons of that pattern. Just a little personal project.
@snow4562
@snow4562 2 жыл бұрын
tutorial please!!! 🥲🥲🥲
@electronix6898
@electronix6898 2 жыл бұрын
@@snow4562 ???
@snow4562
@snow4562 2 жыл бұрын
@@electronix6898 if you can do a tutorial video of your project 😅
@electronix6898
@electronix6898 2 жыл бұрын
@@snow4562 I did it but it's been a long time ago. Fortunately, I still have the breadboard setup, but it's so crappily put together
@snow4562
@snow4562 2 жыл бұрын
@@electronix6898 is it still working? I wanna try it too, I've been into Arduino lately, I've been searching for something cool that I can copy haha 🙈
@HowardRalston
@HowardRalston 4 жыл бұрын
Thanks for the video. Others I've watched had a different way to wire the button and my LED would come on randomly. Your connections fixed that!
@playlistmaster-thebestplay3605
@playlistmaster-thebestplay3605 Жыл бұрын
what can I say, man, HELPED ME OUT, thanks so much man, I needed to watch this fantastic video so I could control my Piezzo element
@aminebenjalel7057
@aminebenjalel7057 Жыл бұрын
Thank you a lot !! You're saving me I have a project about it and this video is exactly what I searched !!! Thank you !!
@russellbloomfield-Luck
@russellbloomfield-Luck 4 жыл бұрын
The advice about the step down resistor was really helpful
@alexwilhelm9182
@alexwilhelm9182 3 жыл бұрын
Remarkable Video! Will be showing this to my son who is currently using Embedded Learner Board by Moonshot Jr. Never thought that understanding Arduino and related coding can be made so easy. Thank you for this video.
@DarlingbroughModelRailway
@DarlingbroughModelRailway 2 жыл бұрын
Thank you! I've been struggling with the if function, but this video has explained it to me in a way I understand! Subbed!
@patstarks
@patstarks 3 жыл бұрын
It looks like there is an extra wire in the animation. Nevertheless, I was still able to follow along and get the LED to light up! Great Content!
@-AhmedMohamedAhmedAhmedMohamed
@-AhmedMohamedAhmedAhmedMohamed 3 жыл бұрын
the orange and yellow ones?
@pedrinho32286
@pedrinho32286 6 жыл бұрын
Impecável José. Bem que estava a reconhecer um sotaque Português. Bom vídeo
@frogoverlord5342
@frogoverlord5342 6 жыл бұрын
e nóis
@Luis3alsa
@Luis3alsa 3 жыл бұрын
Vim logo aos comentários para confirmar isso 😂
@tomasfranco4870
@tomasfranco4870 3 жыл бұрын
bem me parecia ahah
@HamzaKhan-bg9fh
@HamzaKhan-bg9fh 6 жыл бұрын
The virtual sketch differs completely from the actual setup you had. Additionally, the virtual sketch does not work, and it is also the one you went by step by step, so people copied it in their own boards and that it why so many people have problems. You should have at least addressed why the sketch was different from the setup...I spent a while on this video and it ended up not amounting to much.
@cccp9661
@cccp9661 4 жыл бұрын
Agree
@rinopro5556
@rinopro5556 7 ай бұрын
Thank you so much, you explained it in such an easy way!
@MarkSMays
@MarkSMays 6 жыл бұрын
What tool are you using to draw wires between the processor and the breadboard? It’s very nice. Nice demo also.
@michelarens7766
@michelarens7766 2 жыл бұрын
Great video! What software are you using?
@tnxeedihniurndu
@tnxeedihniurndu 2 жыл бұрын
Can you try with a maker uno x?
@MAquaJJ
@MAquaJJ 6 жыл бұрын
For me, you have the best arduino tutorials, keep making please
@freethepotato
@freethepotato 6 жыл бұрын
Thank you so much! I have another in the oven. Sorry I can't make more right now!
@ElectroWolf_Arts
@ElectroWolf_Arts Жыл бұрын
​@@freethepotato i work on a completely another platform , which is the FPGA ..... but i wasnt know about this pullup/pulldown rabbit hole untill i start getting issues reading the capture signals , so thats how its done . thanks a lot man
@deva8496
@deva8496 3 жыл бұрын
I am trying this since last 24 hours using 220ohm and 10kohm resitters but no luck. let me try this as last attempt and I am givving it up forever.
@firewater365
@firewater365 2 жыл бұрын
i appreciate the graphics and the explanations!
@francescomendola
@francescomendola 4 жыл бұрын
int ButtonValue = 0; int Button = 3; int LED = 2; void setup(){ pinMode(Button, INPUT); pinMode(LED, OUTPUT); } void loop(){ ButtonValue = digitalRead(Button); if(ButtonValue != 0){ digitalWrite(LED, HIGH); }else{ digitalWrite(LED, LOW); } }
@dankymoose5334
@dankymoose5334 2 жыл бұрын
thanks bro
@domonkosimrik8051
@domonkosimrik8051 Жыл бұрын
Thx man this works well
@bullet_7717
@bullet_7717 2 жыл бұрын
Really nice! But i have a question, if i want to do the opposit? Namely, with the button not pressed the led must be on, with the button pressed led must be off. In other words, I would like the button to be as normally closed.
@kmhooibg7577
@kmhooibg7577 2 жыл бұрын
Thank you very very very very very much! I've been struggling with the button controlling function! But this video has explained it to me in a way I understand! Liked!
@robertmarkham6558
@robertmarkham6558 6 жыл бұрын
Very good at explaining things, I've spent the last week trying to write a script and it all fell together then i saw you Showing how it works, Thanks!! Subed!!
@user_Francisco
@user_Francisco Жыл бұрын
What resistors should I use?
@virathiyam5401
@virathiyam5401 2 жыл бұрын
Well done my bro.. liked & supported.. I want to ask.. what is the technical name of the 4 leg switch when you push once-led glows dim, push twice-led glows bright, push thrice-led shuts off? The push button on my led lamp stopped woking and I need the name to search and order it in Amazon. I'm not an electrical engeneer so I don't know the name.. plz help out.
@Hektowa
@Hektowa Жыл бұрын
If my button is a little too big can I use a connector to do it?
@x-x1329
@x-x1329 2 жыл бұрын
Thanks. I would like to know how many ohms of the resistor 3:19.
@MuAlamedy
@MuAlamedy 9 ай бұрын
220ohm
@ThatOneRobloxDev
@ThatOneRobloxDev 2 жыл бұрын
i tested it with a Leonardo and a (3rd party ELEGOO) uno rev3, it works both ways, the leonardo is the original, its cpu is all rusted a bit, i think it's from 2013 or 2014, and its a leonardo, made in italy
@chbonnici
@chbonnici 6 жыл бұрын
Very nice explanation but please switch the music off for better concentration. Thank you. Thumbs up
@freethepotato
@freethepotato 6 жыл бұрын
Will do, thanks for watching! :)
@ataurrahman3080
@ataurrahman3080 6 жыл бұрын
best explanation in style
@engravingoffaustspactwithm4648
@engravingoffaustspactwithm4648 2 жыл бұрын
Thanks so much i learned so much thanks and can't i change Arduino by Arduino nano??
@salc9593
@salc9593 2 жыл бұрын
Thank you for posting this video I found it informative. I would like to ask IF the code you wrote can be used to begin a Sketch?
@mysteryigen
@mysteryigen 2 жыл бұрын
THANK YOU BRO I LOVE THIS EXPLAINATION
@technicaltransistor2658
@technicaltransistor2658 3 жыл бұрын
Hi bro in which software you make arduino board circuit
@divyanshshaw6507
@divyanshshaw6507 3 жыл бұрын
I can use 220 oh resiston in this project
@krishaykondapalli9693
@krishaykondapalli9693 2 жыл бұрын
My issue is that I have an attachable power supply rather than an arduino board. Could you still use the attachable power supply?
@JoostArchives
@JoostArchives 3 жыл бұрын
You absolute life saver. I LOVE YOU
@CrazyGreekGR
@CrazyGreekGR 4 жыл бұрын
Programm name for showing how to connect the things on the Breadboard?
@mirzamansoor243
@mirzamansoor243 Жыл бұрын
Very informative Great Work
@jefverreydt2059
@jefverreydt2059 4 жыл бұрын
thx man! great vid
@franksaruhan
@franksaruhan 4 жыл бұрын
What is the ohm value of resistance
@etche1897
@etche1897 2 жыл бұрын
what if instead of connecting a led i want to turn on my computer with that button? How would I do that?
@danieljonas2k15
@danieljonas2k15 5 жыл бұрын
bro, where can i get that amazing simulator? pls help... thanks!
@1ax
@1ax 5 жыл бұрын
@@adamidress558 shut up kid
@purrpsauce2236
@purrpsauce2236 5 жыл бұрын
@@adamidress558you suck bitch
@vrtech473
@vrtech473 7 жыл бұрын
Please continue the series !!!
@freethepotato
@freethepotato 7 жыл бұрын
Hello! Yes, I'm already working on a new video for this week! I also published a new one about PWM last week.
@planethedgehog2427
@planethedgehog2427 3 жыл бұрын
Good video. By the way, it's "an LED," pronounced "an el ee dee." LED is an initialism, read aloud as three separate letters.
@henrybirdseye
@henrybirdseye 4 жыл бұрын
Your effort is appreciated, but background music detracts from the message.
@gtechninja
@gtechninja 4 жыл бұрын
incredible explanation !!! and I want to know how you make the animation. if you used software or any.
@freethepotato
@freethepotato 4 жыл бұрын
Hi thanks for watching. I used fritzing for the parts and circuits, OBS studio for recording and adobe after effects for the animations!
@NitinKumar-xx4xh
@NitinKumar-xx4xh 4 жыл бұрын
What software is that?
@DKYtut
@DKYtut 4 жыл бұрын
Hello I did exactly the same as the video, but I have a small problem: - If i 'Touch' my button my LED will light up. - if I press my button the led will turn off I hope I hear an answer soon, thanks
@curiousminds668
@curiousminds668 2 жыл бұрын
At 2:43 , the direction of the current flow is wrong I think. It should be from Vcc to arduino
@muhamadilinurhayatbinhassa9204
@muhamadilinurhayatbinhassa9204 2 жыл бұрын
what app do u used for circuit simulator??
@sacretshibanda4263
@sacretshibanda4263 5 жыл бұрын
what app is that
@timkardaras8007
@timkardaras8007 2 жыл бұрын
Amazing video! thank you!
@himurakenshin2068
@himurakenshin2068 7 жыл бұрын
Not working . you did different connection on hardware and different on Design :3
@ezeq3693
@ezeq3693 3 жыл бұрын
it didnt work on mine too ://
@ahmedumairan4706
@ahmedumairan4706 2 жыл бұрын
guys be careful when you plug in your 5v and gnd pins cause ive been trying to do this for 2 hours and i relised i didnt plug the 5v and gnd pins to the breadboard🙂
@ThatOneRobloxDev
@ThatOneRobloxDev 2 жыл бұрын
I challenge you, make it so if you click it, it blinks multiple times, or when u click it, it stays on for 3 secs, OR even HARDER, make it fade when u click and stop fading when u release
@liberte_fear6442
@liberte_fear6442 3 жыл бұрын
thanks for m'y first try in the arduino universe ;)
@nickjames9264
@nickjames9264 7 жыл бұрын
Thanks, its working but I'm confused. Why do we don't need a connection from from anode of LED to +5V?
@mehriniso4745
@mehriniso4745 2 жыл бұрын
where code
@hitarthvyas7860
@hitarthvyas7860 3 жыл бұрын
Can someone explain why he connected the button to the 5V pin?
@wajihasaleem
@wajihasaleem 2 жыл бұрын
can you share the code
@SFORSANDEEP
@SFORSANDEEP 4 жыл бұрын
btw could you please tell, whats the software you used for the sketching in this tutorial... Looks great than fritzing
@freethepotato
@freethepotato 4 жыл бұрын
Hi, it was fritzing. I just removed the background.
@opiritetariah
@opiritetariah 2 жыл бұрын
@@freethepotato 😂😂💔
@peterberrig2010
@peterberrig2010 4 жыл бұрын
What is the name of the program you are using to Draw in? :)
@ciscomarte
@ciscomarte 4 жыл бұрын
Hey, I used fritzing and after effects. Thanks for watching
@peterberrig2010
@peterberrig2010 4 жыл бұрын
Jose Dias thank you😊 thank you for the wonderful video 😊
@peterberrig2010
@peterberrig2010 4 жыл бұрын
And i must say that you are amazing to explain!😊
@matthewlam9416
@matthewlam9416 6 жыл бұрын
What about the pull down and up resistor video that you promised?
@pavletrnic1433
@pavletrnic1433 4 жыл бұрын
WHAT PROGRAM IS THAT?!
@BHilde1119
@BHilde1119 4 жыл бұрын
what app did u use for the first part?
@BHilde1119
@BHilde1119 4 жыл бұрын
???
@tjp1432
@tjp1432 4 жыл бұрын
i need help please i have made a 5 pin midi pedal with nano and buttons how do i add led to each button
@dainazinas
@dainazinas 7 жыл бұрын
Challenge accepted!. Same thing using internal pullup resistor ;]
@freethepotato
@freethepotato 7 жыл бұрын
Yes! I should have mentioned arduino has internal pullup resistors.
@snow4562
@snow4562 2 жыл бұрын
I made it! 🤩🤩🤩 Thank you
@neelammasand3627
@neelammasand3627 4 жыл бұрын
Next Time can you please give a link for the code
@Dasgath
@Dasgath 5 жыл бұрын
the diagram and the connection you did are different. Switched ground and pin in the connection for the led... and still works?
@Dasgath
@Dasgath 5 жыл бұрын
Anyways eems like it doesnt matter where you put the resistor, since it is in series it shares the load with the led. Thanks for the tutorial, finally managed to make mine work, i had a bad wire and spent 2 hours trying to figure out what the fuck was going on. Guess i need to learn how to do the serial monitor.
@omarrashads7888
@omarrashads7888 4 жыл бұрын
Can i get the b design simulation program?
@deva8496
@deva8496 3 жыл бұрын
how does your board do nothing when you are connected to pc? my aurdiono keeps running old code that is uploaded. what is the trick here?
@freethepotato
@freethepotato 3 жыл бұрын
Well, probably I had a blank or default Arduino project running. But the behavior you described is expected. The current Arduino code starts running when you power it on.
@RiyaSharma-wn2nc
@RiyaSharma-wn2nc 5 жыл бұрын
Will it work if we remove the Arduino cable?
@ScitiveX
@ScitiveX 5 жыл бұрын
Yes but you'll to provide external power.
@fergspan5727
@fergspan5727 7 жыл бұрын
Now latch it by only when the button is pressed once the light stays on and when pressed again it turns off ?
@thepanda3757
@thepanda3757 3 жыл бұрын
the music is not helping to focus
@adilabusafa
@adilabusafa Жыл бұрын
أهلاً وسهلاً ومرحباً بك-يتعذر التعليق-لا أعلم .
@MM-np4md
@MM-np4md Ай бұрын
Mine is on without pushing the button 😔
@thewings6454
@thewings6454 5 жыл бұрын
Sir you forget something like time delay so this project actually work bt without time gap it take action before glow Led.. thank u
@Eng.KaremWaled
@Eng.KaremWaled 6 жыл бұрын
which simulator did you use ?!
@Alex-fk2ie
@Alex-fk2ie 4 жыл бұрын
I wonder that i've read some code and they said differntly about the LOW HIGH state of the button.Some said that when we pressed , the state of the button == LOW, some said the opposite.Can you explain it clearly :'(
@MrKbtor2
@MrKbtor2 Жыл бұрын
Answered my question that the kit I was using didn't
@RifaiAL
@RifaiAL 6 жыл бұрын
Can you help me build an RGB LED strip strobe light for use with my levitating water effect project? The color combination of RGB strobe LED's must be selectable.
@vincent8368
@vincent8368 3 жыл бұрын
no
@tutornews7596
@tutornews7596 4 жыл бұрын
what's the software you use friend?
@freethepotato
@freethepotato 4 жыл бұрын
Hi thanks for watching. I used fritzing for the parts and circuits, OBS studio for recording and adobe after effects for the animations!
@tutornews7596
@tutornews7596 4 жыл бұрын
@@freethepotato thanks
@StasisTV
@StasisTV 7 жыл бұрын
what software are you using when you show the designs
@freethepotato
@freethepotato 7 жыл бұрын
Hey! I use fritzing for that.
@OTugas
@OTugas 6 жыл бұрын
Help ... Why is the spot (15;C) connected diagonaly?
@alyaaahmed4462
@alyaaahmed4462 3 жыл бұрын
thank you soo much , it helps
@sitinurbaya6157
@sitinurbaya6157 5 жыл бұрын
Hi! i followed the schematic for the breadboard but when i tried to upload the code it gave me error! a help would be greatly appreciated
@Ramon-ei5bc
@Ramon-ei5bc 4 жыл бұрын
how could i make the button work like a switch? i.e hold a state without me having to physically hold the button?
@an_orange8911
@an_orange8911 4 жыл бұрын
use a switch instead of button
@studyandstudyanddonforgettostu
@studyandstudyanddonforgettostu 3 ай бұрын
get a toggle button (am i too late??)
@studyandstudyanddonforgettostu
@studyandstudyanddonforgettostu 3 ай бұрын
4 yrs xD
@PaulRonquillo
@PaulRonquillo 7 жыл бұрын
Hey guy, I like your vids! Certainly better production quality than my tutorials. Been a while since you uploaded, are you gonna keep making content?
@freethepotato
@freethepotato 7 жыл бұрын
Hey! Thank you so much, it means a lot! Yes, I'm going to continuing to post some content. Probably in the end of this week. I've been a little busy with college and stuff, sorry about that. Would you like to see some video/project/tutorial in specific? I might consider it.
@freethepotato
@freethepotato 7 жыл бұрын
Another thing, your tutorials are great! I was checking them right now. Keep it up!
@PaulRonquillo
@PaulRonquillo 7 жыл бұрын
Thanks a lot man, I'm trying to make mine for some Community College Engineering weather balloon projects. And in my area most Community college level don't get too technical, so there's a lot of ground to cover to get to make them able to design their own experiments and be successful implementing them.
@freethepotato
@freethepotato 7 жыл бұрын
Wow, that's actually awesome. I've always wanted to participate in something related to that. There's a lot of things you can apply like telemetry, remote control, wireless comunication, etc. If you need help with something just say the word!
@ARTEJFM
@ARTEJFM Жыл бұрын
con esta simple rutina, hay problemas de rebote de pulsación
@claudidi95
@claudidi95 6 жыл бұрын
Este sotaque não engana ninguém, tinha de ser português, ;)
@gpmscosta
@gpmscosta 5 жыл бұрын
Exactamente, estava a pensar no mesmo xD
@ohnoeehiddengemamardanial793
@ohnoeehiddengemamardanial793 5 жыл бұрын
Dude, one word..... Thanks 👍☺
@finn3721
@finn3721 3 жыл бұрын
Nice, its working :))
@soumyajit5202
@soumyajit5202 7 жыл бұрын
Hey how do you choose the resistors???? I mean according to which context is it LED?
@freethepotato
@freethepotato 7 жыл бұрын
Hey! The resistor is there because if not, there would be a short circuit due to the led's resistance being so small. For that, any value from 300 to 1k (even more) should do. The thing is that the leds brightness increase with the current so you cannot put a very small resistor (more current, more light) neither a huge resistor ( less current ). When a short circuit happens, the current in your systems increases to infinite and that will burn the led. If you want to learn more about this you should see a tutorial about the ohms law. Check this out (about leds): learn.sparkfun.com/tutorials/light-emitting-diodes-leds
@soumyajit5202
@soumyajit5202 7 жыл бұрын
HackTheWorld Thanks
@freethepotato
@freethepotato 7 жыл бұрын
You're welcome!
@flosset9640
@flosset9640 5 жыл бұрын
When i tried to do the sketch it didnt work
@ScitiveX
@ScitiveX 5 жыл бұрын
What problem ? please share your setup and arduino code
@Kirti_Mankar
@Kirti_Mankar 4 жыл бұрын
Very well explain each and everything.. thanks 😊❤️
@ali_the_maze_master
@ali_the_maze_master 3 жыл бұрын
Arduino: 1.8.15 (Windows Store 1.8.49.0) (Windows 10), Board: "Arduino Uno" sketch_jun07a:21:3: error: expected unqualified-id before '{' token {else ^ exit status 1 expected unqualified-id before '{' token This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences. this keeps happing to me
SH Project3 PassiveBuzzer
2:32
Nguyen Duc Tien
Рет қаралды 614
2023 Arduino Tutorial for Beginners 05 - Variable
13:44
SunFounder Maker Education
Рет қаралды 36 М.
風船をキャッチしろ!🎈 Balloon catch Challenges
00:57
はじめしゃちょー(hajime)
Рет қаралды 36 МЛН
Walking on LEGO Be Like... #shorts #mingweirocks
00:41
mingweirocks
Рет қаралды 5 МЛН
Which team will win? Team Joy or Team Gumball?! 🤔
00:29
BigSchool
Рет қаралды 14 МЛН
How to Use a Button with an Arduino (Lesson #5)
20:57
Science Buddies
Рет қаралды 94 М.
Arduino - Turn LED On and Off With Push Button
23:33
Robotics Back-End
Рет қаралды 132 М.
Arduino Tutorial 28: Using a Pushbutton as a Toggle Switch
21:58
Paul McWhorter
Рет қаралды 295 М.
You can learn Arduino in 15 minutes.
16:34
Afrotechmods
Рет қаралды 10 МЛН
How to use a BreadBoard - Electronics Basics 10
7:22
Simply Electronics
Рет қаралды 941 М.
Mechanical  Switches are Obsolete?! Switch to a Latch Circuit! EB#53
10:36
Hacking a weird TV censoring device
20:59
Ben Eater
Рет қаралды 3,2 МЛН
Arduino LCD Tutorial | How To Control An LCD
15:14
How To Mechatronics
Рет қаралды 1,4 МЛН
風船をキャッチしろ!🎈 Balloon catch Challenges
00:57
はじめしゃちょー(hajime)
Рет қаралды 36 МЛН