An IoT drink machine

This one was definitely a fun one to test...

What we have here is an internet-connected drink dispenser. The idea is you can fill it up with your favorite spirituous beverage, set it out at your party, and not have to worry about your friends acting a damn fool.

To get a drink, the user enters their name on the machine's web-interface. The website returns a drink code in the form of 4 colors (for example, BLUE BLUE GREEN RED). The user types their code into the key pad and if the code authenticates, the user has the opportunity to get a drink. But, the machine doesn't want anyone getting too drunk...

Before a drink is dispensed, the user must blow on the built in breathalyzer. If the user registers a BAC below a specified level, the machine opens the valve and gives the user a pour. Else, the user is locked out of the system. However, the user can override the lockout by beating the machine in a game of Simon Says so as to verify their sobriety.

This machine uses an Arduino to drive the LEDs, buttons, speaker, servo and breathalyzer. Connectivity is handled by an ElectricImp which talks to the Arduino over its RS-232 interface. The website is built mostly with php and is spectacularly web 1.0. Database is handled by parse.com and its lovely (read: really really crappy) ElectricImp API.