Amazon Dash Replenishment Pens

A pen holder that determines when there are two or less pens and triggers an Amazon pen set replacement.

Things used in this project

Hardware components

Arduino MKR1000
Arduino MKR1000
× 1
Crayola Air Dry Clay
× 1
Micro Limit Switch
OpenBuilds Micro Limit Switch
× 5

Software apps and online services

Arduino IDE
Arduino IDE
AWS SNS
Amazon Web Services AWS SNS

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)

Story

 Limit switch not pressed

Limit switch pressed. Light turns on.

I used five limit switches and put them in a row so that each one lines up with a pen. I used quick drying clay to make a shape that would line up the pens with the limit switches. The limit switches were larger than I had initially hoped so because of that, I decided that this project was more of a proof of concept rather than a fully fledged project idea.

Modified Code

See the modified code that I wrote and the comments in the code for how my logic works. Below are images of the results are from running the code.
 After running the code, it connects to the system and if it’s two or less pens, a replacement starts

Better view of the code

It displays the number of pens. I started with four pens and started taking them away until the replacement triggered

 In order to not have multiple replacements, I had the code wait until I had more than 2 pens before having the option to replenish

When the system requests a replacement, it asks Amazon to send an email to the user to notify them that the replenishment is being ordered and is on its way.

Leave a Comment

Your email address will not be published. Required fields are marked *

*
= 3 + 9

(Spamcheck Enabled)

Scroll to Top