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!

Author's headshot

Blake Lafleur

Blake Lafleur has written this article. More details coming soon.

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

By clicking and subscribing, you agree to our Terms of Service and Privacy Policy


Related Content

thumbnail image

AlliPMG CultureCampaigns & Client WorkCompany NewsDigital MarketingData & Technology

PMG Innovation Challenge Inspires New Alli Technology Solutions

4 MINUTES READ | November 2, 2021

thumbnail image

Applying Function Options to Domain Entities in Go

11 MINUTES READ | October 21, 2019

thumbnail image

My Experience Teaching Through Jupyter Notebooks

4 MINUTES READ | September 21, 2019

thumbnail image

Working with an Automation Mindset

5 MINUTES READ | August 22, 2019

thumbnail image

3 Tips for Showing Value in the Tech You Build

5 MINUTES READ | April 24, 2019

thumbnail image

Testing React

13 MINUTES READ | March 12, 2019

thumbnail image

A Beginner’s Experience with Terraform

4 MINUTES READ | December 20, 2018

ALL POSTS