It is quite interesting to see how an ancient Iraqi polymath Al-Jazari used the nergy of falling water to drive various mechanisms such as camshafts, clocks, and musical robot bands. He was a pioneer of automation, and invented auomatic gates, water clocks, muscial automata. His mechanisms and ideas look analogous to what we now want to achieve in driving computations by electrical power …
http://en.wikipedia.org/wiki/Al-Jazari#Water-raising_machines
http://en.wikipedia.org/wiki/Camshaft