What led to the invention of batteries and electrical piles?
In 1780 the Italian biologist Luigi Galvani observed dissected frog's legs twiching after being struck by a spark. Galvani used the term "animal electricity" to describe whatever it was that activated the muscles of the frogs. Later, he created an electric circuit consisting of the frog's leg and two different metals, each metal touching the frog's leg and each other, causing the frogs muscles to contract even though the frog was dead.
Soon after Galvani published his observations, Alessandro Volta realized that the frog's moist tissues could be replaced by cardboard soaked in salt water, and current could still be observed flowing from one metal into another, through the salt solution. You will recognise this setup as a very simple galvanic cell. In honor of his discoveries of the "electromotive force" driving galvanic action, the units of that force are named in honor of Alessandro Volta: the Volt. In 1800, Volta invented the battery by placing many voltaic cells in series, literally piling them one above the other. This Voltaic pile gave a voltage of about 50 volts for a 32-cell pile.