My project automatically opens up a homework tab on my computer when the door to my room is open. I decided to make it because when I was younger I would often get caught playing games instead of doing homework, so I thought it would be fun to be able to make a solution to that.
The motion detector "tells" the Photon 2 when motion is sensed, and then the Photon 2 sends a webhook request to my computer, which then executes a AutoHotkey script to open up a google classroom tab.
Two things have to be done in order to "boot up" all of this.
1. I need to start up nodejs to get the code on my computer side going which looks like this.
All this does is it begins running the code on my computer side
2. I need to start up ngrok to allow the webhook from the Photon 2 to reach my computer.
After booting up ngrok, some output shows up on the terminal, including the line above which gives me the link I need to use for the webhook.
Here I have my motion sensor taped into place at the edge of my desk so that it can see my door properly, and the tape is necessary to keep the sensor in place so that it does not get set off by random shakes.
Video of project here














Comments