Will look into the microcontroller and report back.
You can get a software person to write the program but probably you can do it.
You should down load some example programs and see if it works in hour head.
Every micro is a little different and every development tool is different but:
Usually there is a "blink a LED" program. ***every system uses slightly different words***
First you need to agree on some things.
LED = pin-7; you can say"pin-7" every time but "LED" is easy to think.
On=1
Off=0; Depends on if the LED comes on when the pin is high or low.
Write the program
start:
Wait 1: do nothing for 1 second
LED = on
wait 1:
LED = off
jump to start
Also you need to look at "timer" program. (or delay)
If you can see how those programs work you are part way there.
I see you need to test two things. Some thing like:
If lid = closed and timer2=on then (do first thing) else (do second thing)
It looks like you need to understand three demo programs and use the pieces.
If you have question just ask. Please include as much information as possible. (what micro-computer?)