As part of a medieval city project, I faced the challenge of building liftgates for my castles. The mechanism is pretty simple, nothing compared to those working computers and other stuff you find here, but it's also pretty neat, in my humble opinion.
How to use:
Just lower the lever and the door will close. Raise it and the door will open.