Do you hate people sometimes? Or are you lazy as hell? Or are you too impatient to wait till your coffee is ready? We are! We don't like stupid small talks with stupid people in the kitchen. We try to avoid unnecessary walks and we don't want to spend our precious time on waiting. That's why we invented a smart coffee machine which makes it possible to order your coffee from your bedroom or wherever you've got peace without speaking. Unbearable, stupid small talks in the kitchen or corridors with other people aren't necessary anymore and you don't have to wait for your coffee any longer.
Our smart coffee machine twitters the number of made coffees and for your extra comfort there is a simple website where you can simply order your coffee.
Just imagine what you could do with apps like Tasker (http://tasker.dinglisch.net/) on your mobile phone! Just send a simple HTTP-Request automatically to your coffee maker when your alarm rings in the morning and the coffee is ready when you made it out of your bed and into the kitchen!
You can also make a coffee via a google now voice command like demonstrated in the video!
All you need is an Intel Galileo and a coffee maker with a serial port!
This project was put into practice within "multimodal media madness" lab at the Media Computing Group (RWTH Aachen University). Here is the link to the "multimodal media madness" lab http://hci.rwth-aachen.de/m3_ss15.
And this is what you need to make this awesome Project:
- Intel Galileo Gen 2
- Jura/AEG Coffee maker (others should be possible to as long as they have a serial Port; Just check: http://protocol-jura.do.am/)
- Twitter Account
- Water :)
- Coffee beans (Fair Trade of course) :)
Step 1: Prepare the Galileo Board
We decided to use the Intel Galileo Board because it is super easy to configure and you can even run an (almost) fully-featured Linux OS on it, which enables easy scripting with Python! And with Python, we have access to an incredible amount of modules and libraries, including a very simple Twitter-API.
Here is how you need to setup your Galileo Board:
Get the last Linux image for the Galileo board, put it on a microSD card and boot it. More instructions can be found on Intel's own website: https://software.intel.com/en-us/creating-bootable...
Follow those instructions and then connect the Galileo via an Ethernet-Cable to your local Network and make sure that you can connect to it via SSH (https://communities.intel.com/thread/46335).
After you're successfully connected to you Galileo it's time to install pip: https://pip.pypa.io/en/latest/installing.html
To let your twitter followers know that you're caffeine-addicted you have to install the python-twitter library with pip: https://github.com/bear/python-twitter
To communicate with the Twitter-API it is necessary that you've set the correct time on your Galileo (https://communities.intel.com/thread/47645), otherwise the SSL Certificates will be rejected. You should install a ntp client because the Intel Galileo will forget the date every time you unplug the power source! (https://communities.intel.com/message/253259)
Step 2: Setup the Breadbord
The Galileo will host a small website where you'll be able to order your coffee. But in case you'll want to order your coffee in front of the coffee maker we'll attach a button and a LED to the Galileo so that you can still order your coffee in front of the machine.
The setup is very simple:
Connect the LED to pin 8 of your Galileo and the button with pin 10. You could of course change these pins, but don't forget to change the pins in the Arduino sketch later on.
Please also don't forget to use a resistor with the LED. 1k-Ohm should be fine.
The Galileo Board has internal pull-up resistors so we don't need to put one in front of the button.
Step 3: Connect Your Coffee Maker
Now its time to connect your coffee maker with the Galileo. We only need connect the RX pin, the TX pin and the ground pin with the corresponding pins of our coffeemaker.
But how do I find these pins?
The guys of http://protocol-jura.do.am/ did a great job and found out which pins to use: http://protocol-jura.do.am/index/serial_interfaces...
We have a coffee maker with a 5-Port interface.
Connect the RX pin of the coffee maker with pin 0 of the Galileo and the TX pin of the coffee maker with pin 1 of the Galileo and finally the GND pin of the coffee maker to one of the GND pins of the Galileo.
That's it! You successfully connected your Coffeemaker with the Galileo!
Step 4: Upload Python Tweet Script
A simple python script will tweet for you with the total amount of made coffees every time you order a coffee with the Galileo.
In order to use the twitter API you have to register your own application: https://apps.twitter.com/
After you've created your own app go to the app management, select your app and the tab "Keys and Access Tokens". Here you have to create your own Access Token and Access Token Secret. After you've created the tokens, open the attached python script and edit it with your tokens (see also attached screenshot):
#Connect to twitter api. Edit with own keys!<br>api = twitter.Api(consumer_key='<Consumer Key (API Key)>', consumer_secret='<Consumer Secret (API Secret)>', access_token_key='<Access Token>', access_token_secret='<Access Token Secret>');
You could also edit the message that gets tweetet in line 23:
status = api.PostUpdate("Just made me a coffee! No. " + str(count) + " #hypertension #caffeine");
Finally upload the script to your Galileo into /home/root/tweeter.py
You can check if the script works with the following command:
Step 5: Upload Arduino Sketch
Its time to upload the arduino sketch to your Galileo! That's very simple:
Open the sketch in your arduino studio (the intel version!), select the right port and upload it!
Step 6: Make Your First Coffee!
We're done! It's time to order your first coffee!
Just press the button on the breadboard and check your twitter account!
To order a coffee through the website just browse with your favorite browser to http:// or http://clanton and press the order button!
If you want to order a coffee e.g. through Tasker (Android only) you have to issue a HTTP GET request to http://clanton/makeCoffee - This is done in the "Ok Google" video in the intro section!
Enjoy your Coffee!