thank so much it struggled me so much. It is very helpful
@maxmaker-d2c
2 ай бұрын
thanks so much this really helped me
@ferruxmemmedov3157
5 жыл бұрын
Thank you,I was looking for that configuration.
@tanbirulquadirchoudhury4818
4 жыл бұрын
Thank you. Can you please say :What is it the LCD count shows before the delay is introduced. Is it the number of times the loop is being performed/carried out during the period the button is pressed? I will try out the sketch, however it also seems that if the button is pressed for a period greater than the delay(250), the reading will again increment Thanks once agian
@indiasuaujunca
3 жыл бұрын
thanks!!! now I gotta figure out how to turn on the led the number of times the button was pressed!!!
@sheillahmeicaraan6655
2 жыл бұрын
what's the possible program and circuit for this "This is a Counting up program which calculates the number of times the button is pressed. If the number of button pressed is more than 9, it will be displayed as “ > 9”, then program terminates."
@abdullrahimjajeh8572
3 жыл бұрын
How can you set a range for that push button counter that doesn't go over 6 neither below 0? Thank you
@alfredcalleja450
3 ай бұрын
Thanks, I complicated what is a simple code.
@premjagtap5408
2 жыл бұрын
Why have u grounded the other end of the push button?
@MPC1055
5 жыл бұрын
Hey thanks for your code, I have been looking for something like this to incorporate into a project. One slight problem I am having is when I subtract 1 from 10 instead of getting 9 I get 90. Any thoughts on what I am doing wrong?
@MPC1055
5 жыл бұрын
I am sorry I forgot to add that I added a second button that subtracts, so I have one for add and one for subtract.
@nicostich8825
4 жыл бұрын
@@MPC1055 I have the same problem. What can I do about it?
@miriambodnarova9836
3 жыл бұрын
Hi, I have used float press instead of int press. I do not really like having decimal numbers on my display when number of presses is always a natural number but it is still better to have 9.000 than 90.
@riggedupgaming
2 жыл бұрын
I think its because it counts 90 as 9.0 If you use float press instead of int press it should show it as 9.0
@lastchance045
4 жыл бұрын
TEST ok but a single button push would count as 1 unless the button was held down in which case the count continued as long as the button was held down. What would help? Increasing delay is not a solution #include int button = 8; int val; int count = 1; // author used 0 but then the first button push was not counted int press; const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2; LiquidCrystal lcd (rs, en, d4, d5, d6, d7); void setup () { lcd.begin (16 , 2 ); pinMode (button, INPUT); } void loop () { val = digitalRead (button); if (val == HIGH) { press = count ++ ; delay (500); } lcd.setCursor (0, 0); lcd.print("Button Count") ; lcd.setCursor (0, 1); lcd.print(press) ; }
@waliddja6406
4 жыл бұрын
well let me help...u can add another condition after the first and we dont even need a delay. The code goes like that: if (val==HIGH){ if (val==LOW){ press=count++; } }
@attenonmj3708
Жыл бұрын
@@waliddja6406 Lol, was looking for that for a long time, thanks dude
@investwiselyfolks7656
2 жыл бұрын
What do I write if I want the button pressed twice before going to “1” then twice again before going to “2” and so on and so forth?
@GAMINGWITHCHINAR
5 жыл бұрын
What if I want to reset the button presses after 1 second
@mr.e.484
3 жыл бұрын
How would you start over at your count after you count up to a certain number?
@omerbilir3784
Жыл бұрын
if (count>1000); count=0; i guess
@vkumarelectrotech
4 жыл бұрын
which software you are using?
@domingomartinez1536
4 жыл бұрын
Tinkercad www.tinkercad.com/learn/circuits
@nathanostle11
3 жыл бұрын
Does it matter that it's a 250k ohm potentiometer? Or can it be any resistance?
@xirocronixrantz8365
3 жыл бұрын
how would i get the count to stop at zero even if im pressing the button
@domingomartinez1536
3 жыл бұрын
if (count
@domingomartinez1536
3 жыл бұрын
That should set the count back to zero.
@theresonator01
4 жыл бұрын
Why did you need the delay? That part i dont understand...
@patrickmclaughlin6013
3 жыл бұрын
I think it's a easy software debounce.
@shahidiqbal5273
2 жыл бұрын
How to resume conter if power goes off....counter sould not start from start..... It should keep the last value stored in memey... Ones power comes back... It should start from the the last value when power got switched off... Can you write me a code for that...?
@احمدكاظمعباسغرب-ق5ف
4 жыл бұрын
You can paste the code into the response
@domingomartinez1536
4 жыл бұрын
www.tinkercad.com/things/l8FvR899YVa
@gonzalomeadearanda5751
5 жыл бұрын
hey man if you still see the comments on this video I want help. I tried out the same code you use for the video. And something weird happens. The program will ignore the button and will freeze if I connect the cable to the pin I asigned my button to. The weird part comes next, If I unplug the cable or conect it to any other pin it starts running, the number keeps growing and growing without input. Any ideas?
@mrbombomboy9
5 жыл бұрын
Hey i think You forgot to write the Double == in the 16th Line (If (Val==HIGH))and wrote You instead Just one = Let me know if this soveld your Problem Greetings from Germany
@mubbashirshirazi3758
4 жыл бұрын
where is the code to copy paste ?/?
@lightning7546
4 жыл бұрын
someone could got me the site or the code?
@avral4148
3 жыл бұрын
Helpful!
@philipgbullas
4 жыл бұрын
code link pls. thanks.
@pashaskliarov5597
5 жыл бұрын
Спасибо! Очень мне помог в одном деле. Не знаешь случайно как сделать так что бы при нажатой кнопке не продолжало считать нажатия?
@eloreneloreneloreneloreneloren
2 жыл бұрын
3 года назад комментарий оставлен) Но вообще, нужно сравнивать состояние предыдущего нажатия
Пікірлер: 42