Тёмный

Arduino Tutorials: Control a LED with a Button 

HackTheWorld
Подписаться 6 тыс.
Просмотров 402 тыс.
50% 1

Our second arduino tutorial! Here you can learn more about the INPUT/OUTPUT and how to use it.
Don't forget to check out fritzing! An awesome software that was used in some clips in this video.
A new video will be posted next week on Serial communication! Thanks for watching

Опубликовано:

 

30 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 243   
@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 RU-vidrs miss out is amazing, and that's what saved me hours of work! THANK YOU!
@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!
@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.
@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!
@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!
@catacutanroselynb.5632
@catacutanroselynb.5632 10 месяцев назад
Thank you so much. This is the easiest and understandable demonstration video here in RU-vid.❤
@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 !!
@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!!
@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
@russellbloomfield-Luck
@russellbloomfield-Luck 4 года назад
The advice about the step down resistor was really helpful
@firewater365
@firewater365 2 года назад
i appreciate the graphics and the explanations!
@rinopro5556
@rinopro5556 4 месяца назад
Thank you so much, you explained it in such an easy way!
@Ali_Alhakeem
@Ali_Alhakeem 5 месяцев назад
Ok this was really helpful , figured out i didn't use resistor and it works now thank you !
@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?
@ataurrahman3080
@ataurrahman3080 6 лет назад
best explanation in style
@mysteryigen
@mysteryigen 2 года назад
THANK YOU BRO I LOVE THIS EXPLAINATION
@timkardaras8007
@timkardaras8007 Год назад
Amazing video! thank you!
@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
@abdulrahmanmohammad4887
@abdulrahmanmohammad4887 6 лет назад
Very helpful video. Thank you. awesome
@jefverreydt2059
@jefverreydt2059 3 года назад
thx man! great vid
@MarkSMays
@MarkSMays 6 лет назад
What tool are you using to draw wires between the processor and the breadboard? It’s very nice. Nice demo also.
@JoostArchives
@JoostArchives 2 года назад
You absolute life saver. I LOVE YOU
@pimentomori259
@pimentomori259 8 месяцев назад
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
@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
@fergspan5727
@fergspan5727 6 лет назад
Now latch it by only when the button is pressed once the light stays on and when pressed again it turns off ?
@CrazyGreekGR
@CrazyGreekGR 3 года назад
Programm name for showing how to connect the things on the Breadboard?
@snow4562
@snow4562 2 года назад
I made it! 🤩🤩🤩 Thank you
@liberte_fear6442
@liberte_fear6442 3 года назад
thanks for m'y first try in the arduino universe ;)
@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
@Kirti_Mankar
@Kirti_Mankar 4 года назад
Very well explain each and everything.. thanks 😊❤️
@mirzamansoor243
@mirzamansoor243 Год назад
Very informative Great Work
@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?
@alyaaahmed4462
@alyaaahmed4462 2 года назад
thank you soo much , it helps
@Ranvir786
@Ranvir786 6 лет назад
Thank you so much for help :)
@freethepotato
@freethepotato 6 лет назад
Thank you for watching!
@RifaiAL
@RifaiAL 5 лет назад
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
@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.
@bullet_7717
@bullet_7717 Год назад
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.
@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 :'(
@zikpin
@zikpin 5 лет назад
Thank you so much
@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
@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 2 года назад
the orange and yellow ones?
@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 🙈
@OTugas
@OTugas 5 лет назад
Help ... Why is the spot (15;C) connected diagonaly?
@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
@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
@dainazinas
@dainazinas 7 лет назад
Challenge accepted!. Same thing using internal pullup resistor ;]
@freethepotato
@freethepotato 7 лет назад
Yes! I should have mentioned arduino has internal pullup resistors.
@Hektowa
@Hektowa Год назад
If my button is a little too big can I use a connector to do it?
@matthewlam9416
@matthewlam9416 5 лет назад
What about the pull down and up resistor video that you promised?
@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?
@finn3721
@finn3721 2 года назад
Nice, its working :))
@DeepakSingh-gl7vr
@DeepakSingh-gl7vr 3 года назад
thank you brother
@tnxeedihniurndu
@tnxeedihniurndu 2 года назад
Can you try with a maker uno x?
@athsararajakaruna3958
@athsararajakaruna3958 2 года назад
Thank you
@technicaltransistor2658
@technicaltransistor2658 2 года назад
Hi bro in which software you make arduino board circuit
@michelarens7766
@michelarens7766 2 года назад
Great video! What software are you using?
@hitarthvyas7860
@hitarthvyas7860 3 года назад
Can someone explain why he connected the button to the 5V pin?
@sivabharathi1211
@sivabharathi1211 2 года назад
Thankyou 😁
@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?
@user_Francisco
@user_Francisco Год назад
What resistors should I use?
@omarrashads7888
@omarrashads7888 3 года назад
Can i get the b design simulation program?
@franksaruhan
@franksaruhan 3 года назад
What is the ohm value of resistance
@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.
@marlonhimasha9593
@marlonhimasha9593 2 года назад
thanks man..!!!
@deva8496
@deva8496 2 года назад
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.
@Eng.KaremWaled
@Eng.KaremWaled 6 лет назад
which simulator did you use ?!
@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
@muhamadilinurhayatbinhassa9204
what app do u used for circuit simulator??
@Rishiii4
@Rishiii4 6 лет назад
Bro how to use rgb led and when i click on only one button it chages colour randomly how to do that???
@freethepotato
@freethepotato 6 лет назад
A typical RGB LED has 4 legs: one for each color and one for ground. You can connect the three legs to three different ports. In order to turn on a color, just turn that pin to HIGH in the Arduino. I won't go into much detail here, but you kinda just gave me an idea for a new tutorial! Check out this link: learn.adafruit.com/adafruit-arduino-lesson-3-rgb-leds/breadboard-layout
@ConspiracytardHunter420
@ConspiracytardHunter420 4 года назад
thanks
@divyanshshaw6507
@divyanshshaw6507 2 года назад
I can use 220 oh resiston in this project
@engravingoffaustspactwithm4648
@engravingoffaustspactwithm4648 2 года назад
Thanks so much i learned so much thanks and can't i change Arduino by Arduino nano??
@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
@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.
@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
@deva8496
@deva8496 2 года назад
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 2 года назад
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.
@saumyayt2583
@saumyayt2583 3 года назад
THNX BROO
@claudidi95
@claudidi95 6 лет назад
Este sotaque não engana ninguém, tinha de ser português, ;)
@gpmscosta
@gpmscosta 4 года назад
Exactamente, estava a pensar no mesmo xD
@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
@firdodev
@firdodev 3 года назад
What simulator you use?
@x-x1329
@x-x1329 Год назад
Thanks. I would like to know how many ohms of the resistor 3:19.
@MuAlamedy
@MuAlamedy 5 месяцев назад
220ohm
@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!
@danieljonasalcoriza4211
@danieljonasalcoriza4211 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
@thejtblckwngs
@thejtblckwngs Год назад
thx
@rhythms7500
@rhythms7500 5 лет назад
06:13 quite confusing.... But got it working
@thomastekfeldthansen4606
@thomastekfeldthansen4606 5 лет назад
3:03
@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!
@sacretshibanda4263
@sacretshibanda4263 5 лет назад
what app is that
@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 😂😂💔
@StasisTV
@StasisTV 7 лет назад
what software are you using when you show the designs
@freethepotato
@freethepotato 7 лет назад
Hey! I use fritzing for that.
@wajihasaleem
@wajihasaleem 2 года назад
can you share the code
@wouterscott8016
@wouterscott8016 6 лет назад
What is the software that you use to draw the diagram?
@wouterscott8016
@wouterscott8016 6 лет назад
fritzing.org/home/
@martinspence4783
@martinspence4783 5 лет назад
do you teach a class i am looking for a school that teach arduino and atlml
@ThatOneRobloxDev
@ThatOneRobloxDev 2 года назад
i dont even have any pullup / pull down resistors, i do have normal resistors from 10 resistance to 5 million tho
@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
@ARTEJFM
@ARTEJFM Год назад
con esta simple rutina, hay problemas de rebote de pulsación
@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
@chbonnici
@chbonnici 5 лет назад
Very nice explanation but please switch the music off for better concentration. Thank you. Thumbs up
@freethepotato
@freethepotato 5 лет назад
Will do, thanks for watching! :)
@NitinKumar-xx4xh
@NitinKumar-xx4xh 4 года назад
What software is that?
@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!
@pavletrnic1433
@pavletrnic1433 4 года назад
WHAT PROGRAM IS THAT?!
Далее
How to Use a Button with an Arduino (Lesson #5)
20:57
HariFun #133 - 8 LEDs, 8 Buttons, just 2 Arduino pins!
8:20
Arduino Basics Handling Multiple States
10:35
Просмотров 120 тыс.
Push Button and LED control with the Arduino
4:38
Просмотров 332 тыс.
How To Wire It! Buttons & Switches
9:52
Просмотров 131 тыс.
How to Use a Breadboard
12:21
Просмотров 3 млн
How to Program a Push Button with an Arduino
9:45
Просмотров 84 тыс.