So today in this Instructable we are going to make an Amazon dash alike button to which when pressed orders a product online to which it is programmed to do.Amazon dash is generally used to order everyday items like salt,frozen peas,washing powder,etc.In short Amazon dash is used to buy everyday consumables online by just pressing a button.
Now the downside of amazon dash is that it does not gives you the flexibility to order from any vendor online and forces you to buy the product only from amazon.Moreover it only allows you to order the single product online to which it programmed to.So if the amazon dash is programmed to buy Tide(washing powder),it can only buy tide and nothing else.It is hardcoded to do so.You cannot buy anything else using that button.So lets tomorrow if you decide to quit Tide then you have to unfortunately give up using amazon dash button.
But wait,What if we can preconfigure the amazon dash according to our needs ? what if we can ask the button to now not buy tide and to buy salt instead ? In other words what if we can program the button to change the product which we buy by pressing the button ? The answer to this is what we are going to make in this Instructable.
We are going to make a button using Intel Edison which can be configured to buy and then once it is configured all you need is to press the button and your order will be placed online.
Note : In this instructable we are not going to actually contact any vendor servers and are going to make our own server just to demonstrate the concept.Maker's can however code so that actualy order is placed at the vendor's server like Flipkart,Amazon,Snapdeal,etc.
Step 1: Intel Edison Initial Setup
I am not going to cover how to do the initial setup on Intel Edison board but you can surely follow the link below which very well covers how you can get your Intel Edison Up and Running.
Beginner's Guide to setting up Intel Edison
I am using the arduino compatible sheild with the Intel Edison Breakout board.But if you don't have the shield you can still follow the instructable but you will have to connect the button to the corresponding pin accordingly to listen to the button press.I will be connecting the button to D2 of the arduino compatible shield.Any ways that will be discussed as we move on to further steps.
Step 2: Things You Need Before We Start
Below is the description of the picture's you see above :
1st Picture : Now the first picture you see is of Grove Stater Kit plus which is Intel IOT Edition.To know more about what it contains you can check out the link below.
Groove Starter Kit Plus
2nd Picture : The Second picture you see is the Arduino Compatible base shield which we will use to connect the dash button.
3rd Picture : The third picture is the button which comes with the groove kit.If you do not have this button you can still use some other push button but you will have to maybe write the debouncing logic circuit so that the button does not remains in floating state when not pressed.
4th Picture : The final picture you see is a 4 pin Male-Male cable which will be used to connect the button to the Edison board through the arduino compatible base shield shown in picture 2.
Thats everything you need to build your own configurable Amazon Dash alike Button.
Step 3: Connect the Base Shield to Intel Edison
Step 4: Connect the Groove Button to Digital Pin 2 (D2) on the Base Shield
Step 5: Power Up the Edison and Start Intel XDK IOT Edition
1)Extract the zip files to a folder in the directory you like.
2)Open the Intel XDK and click on open an intel xdk project on the lower-left corner.As shown in the figure you will be asked to choose the path where the xdk project is saved.Navigate to the folder where you extracted the files and open the .xdk file.
Step 6: Setting Up the Sparkfun Account
Now in order to make our DIY Dash work we have to somehow make a mechanism to log our data to the cloud.Well in this Instructable i am using the SparkFun Data Stream to store my data which will be similar to storing data on the amazon server and then amazon registers our order and dispatches the product on seeing it.The only thing is here in this instructable you can see that your order has been placed by seeing the sparkfun database stream which would not be in the case of amazon's server as you cannot see whats in their Database :P.
Go to :https://data.sparkfun.com
Create a free data Stream : https://data.sparkfun.com/streams/make.Enter all the details in this page and just make sure you create four quantities in the fields section of productname,quantity,retailer,userid.Enter all the details.After saving the all the details you will get a public key,private key,delete key and also an example URL which when pasted in browser will enter the data to the database.