I had made this prototype before i realized so many people thought of the same thing but anyways i made a video of it and it works very well as long as the motor stays in both sides (see first video to understand).
http://www.youtube.com/watch?v=fn2WFFe0YjY&feature=youtu.be
[http://www.youtube.com/watch?v=kwLx-_6-YSo&feature=youtu.be
PS sorry if its hard to see the camera work was pretty bad](http://www.youtube.com/watch?v=kwLx-_6-YSo&feature=youtu.be)