Push-Thru Coding Guide
Your Push-Thru button needs to be loaded with some code before you can connect your Pantri account, this is the step by step guide on how to do it.
There are a few steps in this process, all of which will require a PC, Mac or computer of some kind. Before you start, you will need to have assembled your Push-Thru button and connected it to an Adafruit Huzzah ESP8266. Once you’ve done that… you’re good to go…
Download all the stuff
We love to use open source tech, it’s what we are all about. One of our favourite applications for programming our devices is the Arduino IDE. You will need to download; Arduino IDE, the libraries used in Push-Thru, the Adafruit board settings and the Push-Thru default code from Github . Don’t worry though…we will take you through it!
Download and install the Arduino IDE
Arduino is an open source platform for makers and inventors like you. The make awesome programmable boards, and have a free and easy to use programming ‘environment’, the Arduino IDE.
Add the Adafruit Huzzah ESP8266 board
The Arduino IDE has a really great way to add new programmable boards, the ‘Boards Manager’. This allows you to quickly add new Arduino compatible boards to your IDE!
Add libraries need for your Push-Thru
Libraries are essentially lists of rules and instructions that our code refers to to make your Push-Thru button work properly. Without them, the Arduino IDE will give you a few errors… because the IDE doesn’t know what the code does/is.
There are two libraries that you will need, and these can be added in a similar way to how you added the Adafruit Huzzah ESP8266 board.
The two libraries are:
Download the code for your Push-Thru
Github is a website that allows us to share all of our open source projects and code. You can head over to our repositories and get a copy of the code to put onto your Push-Thru button.
Setup your Pantri Device
You will need to have a Pantri account for this bit, to sign up click here and create a new account. Its best to add an online retailer to your account too!
We are going to add an item to your inventory, then create a rule (to tell Pantri how many items you want as a minimum in ‘stock’ at home), then add a device to get the device ID to add to the your code in the next step!
Load the code and push that button!
Now all we need to do is to modify the code (adding your unique device ID and your wifi settings ), add the MAC address to the Pantri Dashboard, and test the button!