Go Down

Topic: push button switch control (Read 2552 times) previous topic - next topic


I am new to this....
What iam trying to achieve is, to push a button that turns on an LED for a certain amount of time then, the LED turns. i would prefer to do this without any other equipment . and eventually achieve to push the button for a light show that will finish after a certain time period.
Any help would be much appricated



If you have code, please show it (use the IDE autoformat function, and use code tags).

If you want code written for you, go to "Gigs and Collaborations" and bring your wallet.


ok i am not really looking for someone to write the code for me but just point me in the right direction, eg do i time the switch to stop the LEDs or do i time the LEDs. really not sure , also i have not really writen any code interresting as i dont know where to begin


Try this for starters.  Next, for timing, study BlinkWithoutDelay.


Hi I am new to this and any advice is handy
I would like put into the right direction . The task I would like to achieve is to push a button so an led sequence would start and then it would stop after a specified time ?



Hay thanks I sort of see how this will work but confused that millis is about doing two or more things at once while I am trying to achieve what seems to me one sequence .
Push button - led flashing for a certain time - finish sequence

Coding Badly

@Redloup, do not cross-post.  Threads merged.



sorry for crossing threads , rookie mistake.
BUT thanks for all the info it really connecting dots for me.

Sort of figured out my problem by just changing around my HIGH and LOW commands , so now i push the button and the sequence starts and finishes by itself .

Go Up