Rushan Haque
All projects
PROJECT 12 / Experiments

Sentry Mode

Experiment
DISCIPLINEIoT
YEAR2025
CONTEXTExperiments
Request access
THE PROJECT

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.

ArduinoPython
WHAT IT DOES

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.

HOW IT WORKS
  1. 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.

  2. 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.

  3. 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.

  4. 04

    Plug the key back in

    The moment the Arduino is detected again, the siren stops and the system returns to disarmed.

BUILT WITH
PythonArduino (as a USB key)PySerialPyAutoGUIDiscord webhookWindows
GOOD TO KNOW

It watches mouse movement only, and the siren and sound use Windows features, so it runs on Windows.

Something similar in mind?

Contact
NEXTCodeSense AI