I wanted to create a seamless way to be sure the bar is always stocked. The finished product is a set of sensors that can be mounted anywhere, that automatically trigger reordering when nothing has been on them for a predetermined period of time.
The wiring is really simple. By making use of the built in functionality of Arduino (Smart7688 Duo) you can just wire a switch to each digital pin, and all of them to ground. No resistors or any other parts required.
Go to developers.amazon.com, sign in, and create a new security profile under Login With Amazon. Note your Client ID and Secret. Under Dash Replenishment Service create a new device and the appropriate array of slots. Note the Device Model ID, and each of the Slot IDs.
For actual installation I've created a two layered wood support mount for the buttons, which are then wired at the right length for where they will be mounted. The first layer has s square for the button cut into it, the second layer has two slots to attach the wires. A little wood glue between the layers and the mount is very secure, ready to be attached to wine rack or other cabinet when you'll be storing your bottles. Place it so that the weight of the bottle keeps the button depressed. I'll be having a bunch of these parts laser cut for my final install (when I'm finished building the cabinet.)
Each button correlates with a slot in the DRS setup. Wire your mounted buttons to the LinkIt Duo, or to a breadboard for testing.
Follow the directions provided by MediaTek to set your LinkIt board up as an Arduino Yun.
Load the code from the linked repository onto the board using Arduino.
Comments