Create a simple motion detection and save activity to Google Sheets.
Step 1: Connect Motion Sensor to Photon
- Connect your sensor to a digital or analog input on the Photon. Follow these examples for hooking up common sensors.
Set Up the Hardware
On the PIR sensor itself, with the back of the PCB facing up, find the two small potentiometers. The one on the left controls the range of the sensor (3-7 meters), and the one on the right controls how long the sensor stays triggered once tripped (1.5 - 300 seconds).
- Set the left (range potentiometer) to middle of dial.
- Set the right (timing potentiometer) all the way to the left (counterclockwise) to maximize its timing resolution.
Now we'll connect the PIR sensor to the Photon. Press the sensor into the upper-left corner of your breadboard, then connect it to the Photon as follows:
Step 2: Connect Motion Sensor to Photon
Step 3: Connect to IFTTT Recipe
This recipe captures event and saves to Google Sheet.
- Go here to get recipe
- Change event name to area you want to monitor (example: kitchen, storageroom, office, etc.)
Step 4: Flash Code
- Go to https://build.particle.io/
- Copy/paste below code
- Flash Photon
Step 5: Test & See Results in Google Sheets
- Go https://www.google.com/sheets/about/
- Click GO TO GOOGLE SHEETS
- Walk around sensor to trigger
- Date should now be added to Google Sheets (example below)