Earlier this year Amazon announced the Amazon Dash, a new simple way for you to order some of your favorite household products with the push of a button. However, these buttons are only available for a very limited amount of items at this time and cost approximately $5 per unit. At PMG, we use Amazon for many office purchases from paper and markers to snacks and coffee and we can never seem to be able to keep all of these things readily available at all times, thus making the Dash buttons a perfect solution for this! Except for one thing… the fact that they are not available for all the products that we need, and because of this I went to the drawing board and created the PMG Amazon button.
To create a cheap universal button in a small form factor that can be configured to order ANY product on the Amazon marketplace at the push of a button.
The button is made up of the following components:
- Raspberry Pi 2 with Wireless Adapter
- Arcade Buttons
- Handmade Wooden Box
- Micro-USB cable
Behind the Scenes
When a button is pressed, the items are requested from Amazon and stored in a shopping cart. An email is then sent to a specified member that gives a link to the cart to buy. The shopping carts are saved for 48 hours before they are reset.
The frontend of the web-server utilizes Ampersand.js to handle the shopping carts that are generated from each button.
Setting up the environment
Both the button, and server take a simple config written in JSON to supply the parameters needed to get them up and running.
A couple things to know before getting started:
The Amazon Standard Identification Number(ASIN):
Found at the bottom of any item for sale on the Amazon Marketplace.
- items – the ASIN ID from the amazon listing. This can be multiple products separated by commas
- quantities – the amount of each ASIN to purchase accordingly
- gpio_pin – the GPIO pin used for the button
- led_pin – the GPIO pin used for the LED on the button
- server_address – the address of your amazon button server
- email_address – the email address to notify when a button has been pressed
- quantities – a second, optional email to send when a button has been pressed
These buttons are still a work in progress but are fully operational in their current state and are a great thing to have for any office!
More pics of the process can be found below: