Just a quick note to invite you to visit...
... where I've posted details of a fun (well, to me anyway!) little Arduino project.
You'll find hardware details and a finished piece of software for a pendulum with a small magnet on its end, and an electromagnet beneath where the pendulum swings. The electromagnet is energized from time to time, "nudging" the pendulum so that it swings "forever".
Reed switches monitor the swing, and time the bursts of electromagnetism.
From the page with the Perpetual Pendulum you can access other Arduino stuff, including tutorials.
Hope you enjoy!