I built a copy of an awesome lego clock designed by Hans Andersson:
Mine is a little different in that it uses a Raspberry Pi to control the motors instead of two NXT bricks. Dexter Industries makes a Pi add-on board called BrickPi which allows you to control lego mindstorms motors, etc from a Pi:
Raspberry Pi + BrickPi |
All of the code is written in python and is available on github: