Somebody keeps touching my spaghet. I built this so that it would warn me when people approach, then touch my spaghet. This way I can get home in time to catch them before my spaghet has been touched too much.

What it does

It escalates security warnings as user's approach the armed device. When they get too close it will light warning lights.

How I built it

Asp.NET core, android, particle


The hardware runs on the particle electron board with an interrupt pin on the PIR sensor to detect motion, and a thread that can be toggled on and off by an elevation event from the server to begin or stop tracking distance from the armed object. Finally when a user approaches too close the object will light warning LEDs to warn them that the consequences will never be the same.

The Server is the brains of the operation, it takes events from the particle board determines the current threat level and transmits that data to the mobile device via push notifications. It also exposes API endpoints to allow the mobile app to see the status of the device and arm/disarm it.

The app is just able to do a GET request to fetch details from the device (name, last updated, armed/disarm). The main part of the app is the switch that arms/disarms the hardware. When the user arms, it sends a post request to the API to arm it and otherwise just sends a post request to disarm. To get push notification, OneSignal was used which uses Google Cloud Messaging (GCM) to send the notifications to the android phone.

Challenges We ran into

The PIR sensor has very bad documentation which made working with it difficult.

Accomplishments that I'm proud of

The PIR sensor works! The android app is also able to arm and disarm the security device and can also receive push notifications when someone gets close to the device.

What We learned

Never trust bad documentation

What's next for

Add a piezo-electric speaker to warn users that they are too close Having a web app to also control the device (instead of just an android phone)

Built With

Share this project: