Schematic Source code
I made this little project for Hans, yet another brother of mine. (I have 5 brothers.) He had a garage door to control and bought a little RF transmitter and receiver to control his door. Leo made a nice cabinet with relays to control the 400V 800VA motor. They turned to me to connect those 2 together. The software consists of 2 little state machine’s. 1 State machine wit just 2 states do debounce the input and 1 state machine for opening and closing the door. These state machines are implemented in a bit strange way.
For more detail: Door Opener using ATTiny2313 microcontroller