Hi guys,
I'm looking to include a timer that reset itself when a button is press into an existing loop.
I've made a photobooth that take a picture every time someone push a button. But my camera turn itself into standby mode every 15 minute if no action is made. So I have to force it to take a picture if no picture is take for more than 14 minutes.
The timer will trigger an output (output on pin 11) if 15minutes have pass since the last time the bouton (input on pin 10) is press.
You could use the millis() function to time how long the camera has been on for. To do this you would need to declare an unsigned long variable to hold the millis() number when your camera was triggered. Note that the millis() function returns the number of milliseconds since the arduino started running. This would result in something like this:
Niek_Now:
You could use the millis() function to time how long the camera has been on for. To do this you would need to declare an unsigned long variable to hold the millis() number when your camera was triggered. Note that the millis() function returns the number of milliseconds since the arduino started running. This would result in something like this: