The Millicent chronicles has an excellant example of that. You can read about it here:
http://www.skoolie.net/forum/viewtopic.php?f=9&t=1709
There might be some other articles here about ramp gates. This is just the one I remember best.
Good luck with your project!
Jim