How to Use a Button with an Arduino (Lesson #5)

preview_player
Показать описание


0:00 intro
0:23 materials
0:37 algorithm: pseudocode
1:31 algorithm: flowchart
2:22 build the circuit
8:29 connect a pull-down resistor
9:54 write the code
13:59 test your code
14:19 reverse button behavior
16:18 variables
20:40 up next

#STEM #sciencebuddies #arduino #electronics #programming
*******************************
Connect with Science Buddies:

Рекомендации по теме
Комментарии
Автор

You have no idea how much you have taught me, thank you brother.
I love the way you explain stuff.
May God bless you.

casual
Автор

A brilliant explanation. I was reading a book where I had a similar project with a button and a capacitor. I couldn't implement it properly, and this video helped me a lot!

azatturegeldin
Автор

You explained very well! thank you so much!

eternitysf
Автор

Your vidios in the ardiuno series are amazing.Keep it up bro

aaronjeffery
Автор

Great video! All your explanations are slow and matcable. Great job!

TehnoVito
Автор

how did we know if we connect the LED, at the PIN + or a the - one ? Does it will change something ? Or the voltage juste will be inversed ?

spurfy
Автор

what do i need to edit in order to replace the led with variables?

behem
Автор

How is it when pushing the buttons to stay on/off? Im having a science project where i need an arduino to control the temperature of my desired heat/cold. Please respond...

G-ROQUEPRECIOUSZOEA.
Автор

Hello and thank you very much for the great video. Nevertheless I have a question: why do I have to connect the button anyway to the ground. When I don’t push the button, there is no current flow and the input to the PIN is low. Why is the connection to the ground necessary?
Than you

amirarab
Автор

Hello i have a question, how come does my LED is turned on even, i haven't pushed the button, while if i pushed the button, it just glows brighter? i just followed the commands
TYIA!

anjiiro
Автор

What will happen if place the switch on one side?

And if we place switch in such a way that the legs are placed on two side.how it gets current or voltage to all legs since the two sides are separated by a plastic? insulator?

harishanth.r
Автор

I have a question. Can I just make the button let the electricity flow between the LED and the GND-bus? It wouldn't need as much code

SyntaxError-
Автор

Suggest another videos with pushbuttons: what about pushing for stay on/off, press short and long, press x times to do this and y times to do that in 5 seconds, ....

Lucky_Trucky
Автор

im not sure if this is right but it worked for me insted of == i put a single - and it does the same this.

SgtDangerWaffles
Автор

This code doesnt work. not convert 'digitalWrite(12, 1)' from 'void' to 'bool. How to FIX????

oonmxrs
Автор

I made it so when pressed green led goes on when not pressed red led goes on

ArzenikRawr
Автор

It worked in tinkercard but it didn't work in real life

marvelqueen
Автор

gee I wish when people write the code, they make it bigger to be able to see the code.

rrssmooth
Автор

Couldnt you just use the button as an circuit breaker instead of using code? Seems simpler but the code one is cooler

__KursK__
Автор

I copied the code and it won't compile. This is bullshit!

RJkatztabby