The Amazon Dash button is a tiny device that orders products from Amazon.com at the press of a button. It's designed to be put wherever you store consumeables like paper towels, trash bags, etc. so that you can easily order more when they run out. The Dash is great at what it's designed to do, but did you know inside the Dash is a powerful ARM Cortex-M3 processor and WiFi module that are very similar to wireless development boards like the Particle Photon? You'll even find there are easily accessible test pads on the Dash which allow you to reprogram its CPU and turn it into your own $5 internet button! This guide will explore how to take apart the Dash and reprogram its CPU to run your own code.
This is a good introduction to 'bare-metal' embedded development where you write code to run on a chip without any operating system. Just like an Arduino you have total control over what the CPU does, but unlike Arduino you need to get closer to the hardware to tell it exactly what to do. Be warned that you'll want to have some experience soldering, programming C, and using development tools from the command line to follow this guide--this is not a good intro to electronics project!
This guide builds on some great work by others to understand the hardware available on the Dash. In particular this Exploring Amazon Dash Button project and Amazon Dash Teardown blog post are good sources of info that describe the Dash hardware:
- The CPU is a STM32F205RG6 processor which is an ARM Cortex-M3 that can run up to 120mhz and has 128 kilobytes of RAM and 1 megabyte of flash memory for program storage.
- The WiFi module is a BCM943362 module which in combination with the CPU make it a platform for Broadcom's WICED SDK.
- There's a 16 megabit SPI flash ROM which is typically used in conjunction with the WICED SDK for storing application data.
- An ADMP441 microphone is connected to the CPU and used by the Dash iOS application to configure the device using the speaker on a phone/tablet.
- There's a single RGB LED and a button.
It's still early days in the undestanding of the Dash hardware so this guide will only show how to program the Dash CPU and use its LED. Unfortunately the WiFi module isn't useable yet until a little more investigation is done to understand how it's connected to the Dash CPU and exposed to the WICED SDK. For now you can control the LEDs and even output data on a serial UART with the example code in this guide. In the future as more Dash functionality is understood later guides can explore using more Dash features like its WiFi radio.
Continue on to learn about how to disassemble the Dash and access test pads for reprogramming the CPU.