In order to interface the raspberry with the coffee machine, we replaced button to order coffee by optocouplers, linked with the GPIO of the raspberry pi.
You'll find two different directories in this project:
In order to interface the raspberry with the coffee machine, we replaced button to order coffee by optocouplers, linked with the GPIO of the raspberry pi.
<li>Our databases are stored in .CSV files, so CSV.py contains functions that read those files and change them locally.</li>
<li>As we had duplicates when writing in databases with python on the raspberry, we had to rewrite CSV parser</li>
<li>FoncGPIO.py configures the GPIO, and contains all the functions that simulate coffee machine's buttons. </li>
<li>Every 20 minutes, the main call update_network.sh to test the connection, and if the connection is good, this script calls updateDB.py that update the admin.csv database </li>
<li>The file otherclasses.py contains classes used by the main program.</li<
Here are a few picture of the coffee machine working :
To install Kivy on raspbian and to get started with Kivy: https://github.com/mrichardson23/rpi-kivy-screen
In order to boot directly on the Kivy app, we used a Daemon, following this tutorial: http://www.stuffaboutcode.com/2012/06/raspberry-pi-run-program-at-start-up.html
List of electronical parts: