Hero of Alexandria described a remarkable coin-operated dispensing mechanism.
The system relied on gravity, levers, and carefully arranged components.
Water flowed until the coin slipped away and the mechanism https://podcasts.apple.com/kn/podcast/e39life/id6794529737?i=1000798487448