Dog Walk Notification

by klilly1 in Living > Pets

581 Views, 3 Favorites, 0 Comments

Dog Walk Notification

dogwalk.jpg
justhook.jpg

When at work I wonder if my dog was getting walked on the 12 or so hour days and often rely on roommates and friends to take her out to send Dog Pee-mails. So when the leash is grabbed off the hook reads that nothing is hanging from it, after the walk is over and leash is returned it automatically sends an e-mail that says dog has been walked.

Setting Up the Circuit

Untitled Sketch 2_bb.png
Untitled Sketch 2_schem.png

This Simply circuit that current will flow through the lower-resistance paths. You might of herd people say "electricity takes the path of least resistance," they're discussing a circumstance where the paths differ dramatically in resistance, such as a wet hand vs. an air gap. A switch provides this air gap and as the current will flow between D0 through the 221 Ohm resistor to D5 When the switch between D0 and ground is open. When the switch is shut and because the 221 Ohm resister is much higher resistance than practically all the current will flow through the switch that has close to 0 Ohms.

Circuit:

Hook a Wire from GND to the leg of your switch.

Hook other leg of the switch to D0

Put the 221 Ohm resistor between D0 and D5


Particle Code and PushingBox Setup

Particle Code:

Download the file below and open it up in Notepad++ or what ever you use to open text files.

Open up https://build.particle.io and click Create New App and paste the code. (If you are having issues or have not set up your board head over to Particle setup and guide)

You will need to set up PushingBox for this to work and will need a DeviceID code that is separate from your Spark/particle board ID and this ID needs to be entered into the code on line 33. see top of code for more info.

PushingBox:

Go to : https://www.pushingbox.com/

Login with google account

Go to MyServices .. Add Service .. Choose service you prefer Then go to MyScenarios ..

Enter a name and add scenario .. Add action .. Select service you prefer .. Submit information

Then copy the DeviceID provided by PushingBox and place into the code provided.

Code: Code is attached in the text file. If it is flashed to the core and it starts flashing red just give it time to reconnect to the network and it should work.

Downloads

Switch and Hook Setup

20160319_145027.jpg
20160319_150316.jpg
20160319_150342.jpg

Now comes a little creativity.

I used stuff laying around the shop but really you just need a switch that when down force is applied the switch is pressed.

My supplies:

90 degree 18-Gauge Roof Truss Clip

90 degree angle bracket

Spring loaded switch

Pegboard Hook

Electrical tape

Wire