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.


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

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

Scroll to Top