You dont actually need an adruinno to do this mechanism, but i guess there's other form of uses
@dktechs
Жыл бұрын
I totally agree with you but here my intention was not to switch on and off a LED you can do this without any switch or push button also,here my intention was to read a digital input and control digital output, that's all.
@efrenvillariasa6575
9 ай бұрын
Can you give me the code the one that can continues the on and off thank you
@Expatriate1977
Жыл бұрын
Thank you!
@dktechs
Жыл бұрын
😊
@memelate9624
Жыл бұрын
bro if u didn't use bool it cud have worked if(btnsts == HIGH) digitalWrite(ledpin,LOW)
@dktechs
Жыл бұрын
Bro I didn't get you... Any logic in c or c++ you can write in thousands way... What I wanted accordingly I achieved my target and whatever I wrote in code you can write in hundreds ways. But sorry bro exactly I am not getting what do you want to say.
@memelate9624
Жыл бұрын
@@dktechs nvm it shud fit ur taste
@Learningontop
11 ай бұрын
Sir I want that when my button press for how many time no matter but by output will turn off after 30 second so what I do.
@dktechs
11 ай бұрын
So many ways to perform this one of them you can use a timer when you press a button start 30 seconds timer and make output High and stop reading button,when 30 seconds timer stopped you can make output low and start reading button.For this you use a flag to keep track of time or timer ISR
@rubiksbest171
Жыл бұрын
Hi. May I know how much resistance is that resistor?
@dktechs
Жыл бұрын
220 ohm
@rubiksbest171
Жыл бұрын
@@dktechs thanks!
@dktechs
Жыл бұрын
You can use any values between 150 and 400 to protect your LED from high current if you want to explore more about LED resistor you can checkout this video kzitem.info/news/bejne/tH-MzJtpaZF8loo
@davariz
8 ай бұрын
Estou tentando achar um codigo que eu teria que clicar uma quantidade de vezes no butao (dentro de um espaco de tempo) para o led acender por uma quantidade de tempo
@dktechs
8 ай бұрын
You have to use timer and counter to achieve this.When button pressed increment counter by 1 as well as read timer value. Say if you want to turn ON LED for 5 seconds when two times button pressed in one second then if you counter value is two in one second turn ON LED and run timer for 5 seconds after 5 seconds turn OFF LED.
@efrenvillariasa6575
9 ай бұрын
I follow your code but doesn't work my Arduino app
@dktechs
9 ай бұрын
Doesn't work means it's not compiling in IDE or hardware is not working?
@prashantk6823
8 ай бұрын
Which resistor use?
@dktechs
8 ай бұрын
For pull up or pull down you use between 1k and 4.7k.
Пікірлер: 21