A vending machine that dispensed a set amount of water for ablutions when a coin was introduced via a slot on the top of the machine. This was included in his list of inventions in his book Mechanics. When the coin was deposited, it fell upon a pan attached to a lever. The lever opened up a valve which let some water flow out. The pan continued to tilt with the weight of the coin until it fell off, at which point a counter-weight would snap the lever back up and turn off the valve.
https://en.wikipedia.org/wiki/Hero_of_Alexandria?wprov=sfla1