Door Opener:
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.
They are not implemented in a big switch() statement but each state of the state machines is a little function on it’s own and the current states are remembered by 2 function pointers. This project has been working flawlessly ever since I installed it in October 2000
Read more: Door Opener using ATTiny2313 microcontroller