Welcome to Coffee Button
Order your coffee in one click or everything else
Click the button, the raspberry boot, call your webhook then shutdown
What you need to run the project
- a Raspberry Pi with Wifi, or ethernet connection if you like cables
- an SD card (2GB should do)
- 2 leds (red & green, or anything you see fit) with 330Ω resitors and cables
- a push button with cables
- optionnaly a breadboard, to check the connections before soldering the elements
How to build
- Connect the push button on pins 5 & 6 (SCL & Ground), so the click will wake it.
- Connect the green led and a resistor on pins 32 & 34 (PWM0 & Ground).
- Connect the red led and the other resistor on pins 12 & 14 (PWM0 & Ground).
How to setup
- Get a Raspbian lite image from the official page
- Burn it on the SD card: ex. on Linux/BSD ->
sudo dd bs=1M conv=noerror,sync status=progress if=<path_to_your_img/name.img> of=<path_to_mounted_SDcard>
- Start the pi with screen and keyboard to configure Wifi, using the
- Get sources. Either with git or by hand :
- Git :
apt install -y git git clone https://github.com/Zenika/coffee-button
- copy source code to
/home/pi/coffee-buttonon the pi
- Make a copy of
.envand add the webhook and token you created. We used Zapier to handle the request and filter the Authorization header then send the email and Slack notification. You also need to set the number of days between orders (integer required)
- Test the script on pi by running
init.shto the boot process : edit
/etc/rc.localand add a line
Push the button ! Leds will flashes after a few seconds then green if the request was sent or already sent in the previous 48h, red if something went wrong.
- Github: @yodur2potassium
- Github: @louckousse
Show your support
This README was generated with