https://www.danielbiegler.de/post/how-to-hack-your-coffee-machine-to-serve-you-via-wifi/
I hacked my coffee machine to serve me coffee via a beautiful web interface and blogged about the process. This is the used code.
GPIO2
=>Toggle power
GPIO3
=>Brew one cup
GPIO4
=>Brew two cups