I just want to see an example code that does the following:
Lets say i have an bulb wired to an relay and arduino that switches relay on/off with a pushbutton.
Regardless of how long I hold the button down, I want the bulb to light up for just 1 second before turning off again.
If i release the button and push it again i want the same to happend.
I want to trigger a garage door opener and my opener must be hold down for 1 second before the door moves. If i hold the button too long nothing happennd.
Therefore i want to give power to the trigger for one second before it turns off regardless to how long i hold the button down.
Sorry for my bad english, but i just want to see an example code that gives me something to work with