Sentry Mode
A personal experiment.
A USB-key alarm for your PC: remove the Arduino to arm it, and any mouse movement sets off a siren and a phone alert.
Sentry Mode turns a Windows PC into a small alarm system. A spare Arduino plugged into a USB port is the physical key: while it is in, the PC is safe and relaxed. Pull it out, and the computer is armed.
If anyone touches the mouse while it is armed, the PC sounds a loud two-tone siren and sends an alert to your phone, so you know about it even when you are away from the desk.
- 01
The Arduino is the key
A Python script checks the USB ports every tenth of a second and recognises the Arduino board by name. The system starts disarmed with the key in.
- 02
Remove the key to arm
When the Arduino is unplugged, the script waits three seconds so you can step away, then arms itself and records where the mouse pointer is.
- 03
Movement raises the alarm
If the pointer moves more than a few pixels, the system switches to alarm: a two-tone siren plays through the speakers and a message is sent to a Discord channel, which arrives as a notification on your phone.
- 04
Plug the key back in
The moment the Arduino is detected again, the siren stops and the system returns to disarmed.
It watches mouse movement only, and the siren and sound use Windows features, so it runs on Windows.
