From:  http://www.mlahanas.de/Greeks/HeronAlexandria2.htm

Heron's COIN automat


A coin is inserted in A and lands on the receiver R causing it to fall. This action would raise the other side of the lever P to rise opening the valve and allowing water to flow out of the spout M. The coin would slide off of the receiver and the valve would close.

Click here to see a Modern-Day Model.


From: A History of Science by Henry Smith Williams

There is one mechanism described by Heron which was a most explicit anticipation of a device, which presumably soon went out of use, and which was not reinvented until towards the close of the nineteenth century. This was a device which has become familiar in recent times as the penny-in-the-slot machine. When towards the close of the nineteenth century some inventive craftsman hit upon the idea of an automatic machine to supply candy, a box of cigarettes, or a whiff of perfumery, he may or may not have borrowed his idea from the slot-machine of Hero; but in any event, instead of being an innovator he was really two thousand years behind the times, for the slot-machine of Hero is the precise prototype of these modern ones.

The particular function which the mechanism of Heron was destined to fulfill was the distribution of a jet of water, presumably used for sacramental purposes, which was given out automatically when a five- drachma coin was dropped into the slot at the top of the machine. The internal mechanism of the machine was simple enough, consisting merely of a lever operating a valve which was opened by the weight of the coin dropping on the little shelf at the end of the lever, and which closed again when the coin slid off the shelf.

...Yet to the worshippers, who probably had entered the temple through doors miraculously opened, and who now witnessed this seemingly intelligent response of a machine, the result must have seemed mystifying enough; and, indeed, for us also, when we consider how relatively crude was the mechanical knowledge of the time, this must seem nothing less than marvelous. As in imagination we walk up to the sacred tank, drop our drachma in the slot, and hold our hand for the spurt of holy-water, can we realize that this is the land of the Pharaohs, not England or America; that the kingdom of the Ptolemies is still at its height; that the republic of Rome is mistress of the world; that all Europe north of the Alps is inhabited solely by barbarians; that Cleopatra and Julius Caesar are yet unborn; that the Christian era has not yet begun? Truly, it seems as if there could be no new thing under the sun.