Keypad Disable for Bad Children
Hello:
Got an interesting application and I'm wondering if anyone has already done this. It's a keypad button to monitor kid's rooms and optionally prevent them from turning on lights.
Keypad button should toggle and monitoring a room conventionally, but with the added function of a press-hold that toggles a 2-state variable (ENABLE/DISABLE). Function and LED logic should be as follows:
Room ON, ENABLED = LED ON, (press to toggle light off)
Room OFF, ENABLED = LED OFF, (press to toggle light on)
Room ON, DISABLED = LED RAPID FLASH, (press-hold to toggle ENABLE/DISABLE)
Room OFF, DISABLED = LED FLASH, (press-hold to toggle ENABLE/DISABLE)
Catch is that the state variable should automatically enable after 'n' minutes in the DISABLE state
Anyone care to share how to do this?