One of my life dreams as a child was to be able to fool a vending machine with quarter-like objects. I mean, how smart could a vending machine be, right? Wrong. More like how dumb a kid I was. Vending machines use light sensors to measure the size of a coin and electromagnets to detect the metal type to determine what kind of coin it is. If you’re not shaped like a quarter and built like a quarter, you ain’t a quarter in their book.
The whole system of what happens inside a vending machine is actually pretty interesting.