Are you worried your boss will catch you watching YouTube during work hours? If so, here's a setup for you!
This program will return you to your desktop when a distance sensor is triggered. This way, to a third party, it would appear that you were just passionately inspecting your wallpaper.
This program has two parts: the code running on the Arduino and the code running on your PC.
-
Requires an Arduino UNO or an equivalent microcontroller and a HC-SR04 sensor. Connect like below.
-
Using the Arduino IDE or the PlatformIO IDE VSCode extension, open the
/src/distanceReporter.cpp
file and upload it to the board. Position the board by your door.