"Build a better mousetrap and the world will beat a path to your door."Mousetrap 20.20
We take the traditional old fashioned wooden plank spring loaded mouse trap and bring it up to 2020 specs. The old adage goes, "If it ain't broke, dont fix it, add wifi."
Start with a wooden mouse trap. The simple wooden plank trap can be used as a switch. When the trap trips the circuit of the spring mechanism is broken. Add alligator clips and a particle argon and we have a party that no mouse will want to leave.
Connect ground to the bait holder and the other side to D0.
This is the most basic system with a single digital input.
We setup the particle input using an internal pullup resistor to allow for detection of the mouse trap state.
When the trap is set the circuit is closed and D0 = FALSE, LOW or 0
We "gotem" when the input rises TRUE, HIGH or 1.Remote Detection
No IOT mouse trap is complete without a global detection indicator.
We setup a second particle to subscribe to the first. When we "gotem" we flash the onboard D7 LED.
You may wish to modify the code to latch the LED on, but for fast demo purposes the remote will only flash once.