Robot-coffees made yet: 248
As soon as you tell Alexa the phrase „Alexa, trigger vanilla coffee with sugar“, or the same without „with sugar“, or simply chocolate instead of vanilla, Alexa forwards the event to IFTTT (check out in Google Play Store or App Store). From there, a recipe makes a HTML POST request to my webserver with a password and the type of coffee someone yelling at Alexa want. The web server writes the new task – if the password was correct – into a json file. For a very long time, I wanted a robotic arm. Unfortunately, I never had a purpose for what I could use this arm, but when my old coffee machine broke, I decided to order an Arduino Braccio robot.
On the other hand, a Python script on my Raspberry Pi frequently opens another PHP script on my web server (every 5 seconds) to check if a new task is in the json file. As soon as there is a new task, the Raspi sends a command via Serial communication (USB cable) to the Arduino Uno board that steers the robot.
On the Uno, the path of the robot is saved and executed to brew the desired coffee. For those of you wondering how the robotic arm is commanded, I give him all angles for the 6 Servo motors. If there is a new angle, the servo moves into that direction with a pause of 30ms between each step (1°).
The capsule and sugar holder was made with my 3D printer (Flashforge Creator).
Here’s the script: