I have a fan by my bed hooked up to a remote control unit. The remote has an on and off button. I want to make some sort of circuit where if I press a button (lay down on my bed) it will trigger the on button of the remote, but just once for battery's sake, and then when I get up, it will trigger the off button on the remote, just once again. I would like to use some sort of basic digital logic rather than an AVR. How feasible is this?