loading

The Amazon Dash button is a great new device that can be bought for only $5. Very shortly after the release of it the first working hack of it was published online. It showed you how to detect when the button was pushed on your computer and to launch a program in response to it using a few lines of python code. I was very impressed with the hack and I wondered if I could make it run something on hardware instead. My first thought was the Raspberry Pi.

In this tutorial I will show you how to use a Raspberry Pi with the Dash Button to control a lamp or any other electronic device.

Step 1: Materials

Material List:

1.Raspberry Pi-I would recommend using the new Raspberry Pi 2 or you could use the B/B+.You will also need the basics for it such as a mouse,keyboard, power supply, and display.

2.Amazon Dash Button-Any product button will do, just make sure to not set it up when you get it.

3.PowerSwitch Tail II-This is used by the Raspberry Pi to turn on and off any AC electronic device.

4.SD Card-You will need to install a fresh copy of Raspbian onto it. Make sure that it is 4GB or more.

5.Wifi Adapter-This is to make sure that your Raspberry Pi can connect to the internet to recieve an ARP probe any time the button is pushed.

6.Raspberry Pi ribbon cable-this is not needed if you want to solder or use alligator clips to connect the PowerSwitch Tail to your Raspberry Pi's GPIO connectors.

7. Any AC Device- this is up to you to decide what device you want to turn on. I will use a my bedroom lamp for this experiment.

<p>Could I run this script on any device attached to the network (without GPIO of course) or does the dash button connect to the PI? I'm unsure how ARP probes work, do they just get sent to every device on the network?</p>
<p>I'm having trouble with the basics on connecting the powerswitch tail to the raspberry pi. I have a ribbon GPIO connector, do I insert the male end of a jumper cable into the correct GPIO and then strip the female end of the cable and shove it into the powerswitch tail?</p>
Yes that should work fine.
<p>I'm trying to setup a similar thing at home except I have it controlling a wemo switch. How do you get the button.py program to run in the background and be monitoring for a button push all the time. I can only get it to run manually and it only scans for 30 seconds or so. </p>
Try adding a basic python loop.
Yeah, you say that like I know how to do that! Not got the first clue about python.
<p>can't get this to work &quot;ImportError: No module named pcapy&quot;</p>
Try this command<br>sudo apt-get install python-pcapy
<p>Such a cool idea! </p>

About This Instructable

19,806views

35favorites

License:

More by Benjamin E.B:Amazon Dash Button Lamp Control 
Add instructable to: