Timeline for Turning off a LED
Current License: CC BY-SA 4.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 22, 2021 at 13:37 | comment | added | Biancaaa | so, this is the edit which i made in the code. I am new in this domain (arduino), but I will pay attention to the advices you explained above about the functions. If i set pushpressed to 0 in function startBuzz, the led for the first alarm will not turn off definitive when the pushbutton is pressed, instead, the second led for the second alarm can be turn off when the same pushbutton is pressed. | |
May 22, 2021 at 13:33 | comment | added | Biancaaa | ' void startBuzz() { if (pushpressed == 0) { if (ledState == LOW) { ledState = HIGH; } digitalWrite(ledPin, ledState); } else if (pushpressed == 1) { ledState = LOW; digitalWrite(ledPin, ledState); } pushpressed = 0; } ' | |
May 22, 2021 at 13:13 | comment | added | Dave Newton | @Biancaaa Maybe post your current code in a gist or here; I can take a look in an hour or two. | |
May 22, 2021 at 10:07 | comment | added | Biancaaa | sorry if i bother you , but i followed your advice about reseting the stop button, but i can't handle it. Before the end of void startBuzz i wrote "pushpressed = 0;", but it is still not working @Dave Newton | |
May 19, 2021 at 9:44 | comment | added | Dave Newton | @biancaaa I'll make a similar circuit and post my code somewhere and post a link. Not soon enough to help you, bit hey :) | |
May 19, 2021 at 5:44 | comment | added | Biancaaa | thank you very much for you response, I think I have to read several times your instructions and then apply them. Good luck with you book! | |
May 16, 2021 at 19:45 | comment | added | Dave Newton | Well that turned into a lot of words. This is what happens when I'm in the middle of writing book. | |
May 16, 2021 at 19:44 | history | answered | Dave Newton | CC BY-SA 4.0 |