A mouse jiggler is a tool that automatically sends mouse input to a computer to simulate activity. Users use mouse jigglers for a variety of tasks such as preventing their computer from sleeping or satisfying applications that require periodic input.
With a few commands, you can enable your TinyPilot device to act as a simple mouse jiggler.
To set up TinyPilot to act as a mouse jiggler, connect to your device over SSH and run the following commands:
JIGGLE_INTERVAL_MINUTES=3
cat << EOF | sudo tee /etc/cron.d/tinypilot-mouse-jiggle
*/$JIGGLE_INTERVAL_MINUTES * * * * tinypilot /bin/echo -ne "\0\x03\x16\x58\x4c\0\0" > /dev/hidg1 && /bin/echo -ne "\0\xbc\x1b\xdd\x2a\0\0" > /dev/hidg1
EOF
Running the above command will cause your TinyPilot to move the mouse cursor every three minutes.
To stop your TinyPilot from acting as a mouse jiggler, simply remove the file by connecting over SSH and running the following command:
sudo rm /etc/cron.d/tinypilot-mouse-jiggle