loading

Hey everyone, In this instructable, I will show you how to a simple device that counts how many trick or treaters have come to your house. This can be useful for an estimation of how much candy you have to buy for next year.

Step 1: Parts and Tools

Here are the parts and tools that you will need to make this project:

Parts:

PIR sensor

Linkit ONE board and Wifi antenna (included with board)

Cheap Dollar store jack-o-lantern

Tools:

Computer with latest Arduino IDE and linkit one drivers

Rotary tool

Soldering Iron

Step 2: Wiring

Wire the positive pin oft he PIR sensor to the 5v pin on the linkit ONE, the negative pin to the ground pin on the board, and signal pin to A0.

Now, plug the WiFi antenna into the uFL connector that says "WiFi/BT".

Step 3: Upload Test Code

Upload this code. It is called the test code because it requires the serial monitor to be open, and we don't want that. We do need to find the Correct IP address, which is the main reason for this code.

Download the code, Double click open it, then press upload. Shortly after, open the serial monitor, and find the first IP address shown. Copy that address into an internet browser, and press enter. It should show how many times it has detected motion. If it does, go to the next step.

Step 4: Upload Final Code

Upload this code, The only difference now, is that all serial lines have been commented out, so the serial monitor doesn't need to be open while the project is in use.

Step 5: Modify Jack-O-Lantern

Take the cheap Jack-o-lantern apart by removing the two screws at the back. You don't have to use a plastic jack-o-lantern, you can just use a regular project enclosure if you want to. The front and back halves should split apart now.

Remove the piece with the small lightbulb. Now, try to put the board into the enclosure and mark where the micro USB is on the jack-o-lantern. Now, use a rotary tool to cut out the slot for the micro USB cable to go into. Then, use hot glue to secure the PIR sensor in one of the eyes in the pumpkin, and glue the board to the sides of the jack-o-lantern. Finally, Put the two halves of the enclosure together again, using the screws that you removed earlier.

Step 6: Test...

Test if it works by powering it through USB, and paste in the IP address from the test code into a web browser. If it works, you will see "Trick or treaters:" and a number followed by it. When it detects motion, There will be a delay, then it will say how many people have come to your house.

<p>How many trick or treaters did you get?!</p>

About This Instructable

1,630views

22favorites

License:

Bio: My name is Zach Sousa and I'm a Canadian highschool student that has a passion for making.
More by Zach Sousa:CNC Oak Watch Box CNC Camera SD Card Holder Edge 3D 3.0 - A $200 3D Printer 
Add instructable to: