Story
Digispark ATTiny85 USB Mouse Jiggler
Turn your Digispark ATTiny85 into a simple yet powerful USB Mouse Jiggler using the DigiMouse library!
This tiny project ensures your computer never goes idle or locks automatically — perfect for long-running tasks, presentations, or downloads.
Project Overview
The Digispark ATTiny85 is a compact and affordable microcontroller that can easily emulate USB devices.
In this project, it acts as a virtual USB mouse, performing small, periodic cursor movements to keep your computer awake.
Once plugged into a USB port, the device automatically moves the mouse cursor in a subtle square pattern — right, down, left, and up — every few seconds.
These movements are minimal enough not to interfere with your workflow but effective enough to prevent system inactivity or screen lock.
⚙️ Key Features
✅ No extra hardware required — runs entirely on the Digispark ATTiny85
✅ USB HID mouse emulation using the DigiMouse library
✅ Configurable movement interval (default: every 2 seconds)
✅ Prevents automatic sleep, lock, or screensaver activation
✅ Plug-and-play operation — just connect it to any USB port
How It Works
-
The DigiMouse library initializes a virtual USB mouse.
-
In the main loop, the device moves the cursor slightly in four directions — forming a small square.
-
A delay is applied (default 2000 ms) between cycles to keep movements subtle yet consistent.
-
The loop repeats indefinitely, keeping the system in an active state.
Required Library
#include <DigiMouse.h>
The DigiMouse library enables the Digispark ATTiny85 to act as a USB Human Interface Device (HID), simulating mouse movement and clicks.
Applications
➤ Prevent Screen Lock: Keeps your computer awake during long downloads, updates, or file transfers.
➤ Perfect for Presentations: Ensures your display never turns off while presenting.
➤ Ideal for Testing & Automation: Maintains system activity during unattended operations.
➤ Useful in Controlled Environments: Prevents automatic sleep on machines that require constant monitoring.
Example Use Case
Simply upload the sketch to your Digispark ATTiny85, plug it into your PC or laptop, and let it do the rest.
Your system will remain active — no more manual mouse wiggles!
⚠️ Note
➤Works best on Windows, macOS, and Linux systems that recognize standard USB HID devices.
➤Ensure to adjust movement intervals and directions in code if you want a different pattern or timing.
Conclusion
With just a few lines of code and the Digispark ATTiny85, you can build a fully functional USB Mouse Jiggler that prevents your system from going idle. It’s a compact, low-cost, and practical tool for anyone who needs to keep their computer awake — hands-free!




