This website uses cookies to ensure you get the best possible experience. See our Cookies Policy.

PMG Digital Made for Humans

Buying things on Amazon…The PMG Way!

3 MINUTE READ | September 11, 2015

Buying things on Amazon…The PMG Way!

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

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.

Since the Raspberry Pi hardware is limited, I decided to use GoLang to power the software running on both the Raspberry Pi and the web-server instead of JavaScript, PHP, or Python. And used the Embd library for handling the GPIO pins on the Raspberry Pi. This will allow us to run multiple buttons off of one Raspberry Pi without having to worry about them being bogged down.

The frontend of the web-server utilizes Ampersand.js to handle the shopping carts that are generated from each button.

Screenshot_2015-09-09_15-29-27

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.

The Raspberry Pi GPIO pins

You will need to choose 2 pins to control the button. An LED pin, and a INPUT pin. These are used to light the LED and listen for button presses.

  • 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:

Stay in touch

Bringing news to you

Subscribe to our newsletter


Posted by Blake Lafleur

Related Content

thumbnail image

Get Informed

PMG Innovation Challenge Inspires New Alli Technology Solutions

4 MINUTES READ | November 2, 2021

Get Informed

Applying Function Options to Domain Entities in Go

11 MINUTES READ | October 21, 2019

thumbnail image

Get Informed

My Experience Teaching Through Jupyter Notebooks

4 MINUTES READ | September 21, 2019

Get Informed

Trading Symfony’s Form Component for Data Transfer Objects

8 MINUTES READ | September 3, 2019

Get Inspired

Working with an Automation Mindset

5 MINUTES READ | August 22, 2019

Get Informed

Parsing Redshift Logs to Understand Data Usage

7 MINUTES READ | May 6, 2019

Get Inspired

3 Tips for Showing Value in the Tech You Build

5 MINUTES READ | April 24, 2019

thumbnail image

Get Informed

Testing React

13 MINUTES READ | March 12, 2019

Get Inspired

Tips for Designing & Testing Software Without a UX Specialist

4 MINUTES READ | March 6, 2019

Get Informed

A Beginner’s Experience with Terraform

4 MINUTES READ | December 20, 2018

ALL POSTS