My partner and I are planning on making a device that helps save energy. When the device senses motion or a change in light, the lights will turn on, but once there is no longer motion after a little while, the lights will automatically turn off unless you keep it on lock. We were thinking of using a motion detector, light sensor and a rotary angle sensor to make this work.