program a time off delay

Andrew philips

New Member
Hello im new at programming and wanting some help with finishing a project.i need ta no how to programme time off delay for 30 seconds
project is alternating flashing lights which come on when pin 3 goes high once pin 3 goes low i need the lights to stay alternating for a further 30 seconds.
useing a 08m
 

BeanieBots

Moderator
Presumably you know how generate a time delay to make the lights flash.
You know how long that delay is.
So, when input 3 goes low, count the flashes until 30 seconds has elapsed, then jump to an end point in your program.
Have a look in the manual for if/then statements. "IF" is used to test a condition such as when input 3 goes low (or a counter reaches a certain value). "Then" is where to go or what to do when that condition is met.

I'm sure somebody will jump in and write the exact code for you but you won't learn unless you try yourself.

Have you considered what to do if input 3 goes high again during the 30 second timeout?
 
Top