1) Give a description of the problem
Whats an efficient routine to monitor a motion sensor and if there is still motion within a couple of minutes, keep the lights on.
As a user I want the light to turn on if I enter the kitchen at night for 10 minutes and reset timer to 10 min if there is still motion within these 10 minutes. then turn off
How would I best do that ? eg with if, while or for loop?
thanks chris