I've worked for companies and departments that severely lock down their IT infrastructure, even for those of us in technical roles. A lot of the limitations forced onto the company-issued PCs make sense for the majority, but there are plenty of exceptions and unfortunately bureaucracy prevents flexibilty. You generally get used to the delays and difficulties this causes, or alternatively you find workarounds.
This project is a workaround for the frustration of windows PCs automatically locking after a non-configurable duration.
A small USB device remains connected to an otherwise un-used port. It identifies as a mouse and every sixty seconds it will move the cursor a single pixel (alternating up/down). This is unobtrusive and goes un-noticed by the user, but causes PC to "believe" there is a user present and thus prevents auto-locking.
Further details including the open firmware are available on the gitlab repository.
This firmware has been tested on two ATmega32U4-based development boards:
The beetle is a cheap ATmega32U4 dev-board with card-edge contacts for directly plugging into a USB type-A port. Because it is firmware-compatible with the Arduino Leonardo, it is safe to assume that this firmware will work with the leonardo itself, as well as other leonardo-compatible boards.
The Pololu A-Star 32U4 Micro uses a different bootloader, but no changes are required to the code. Even the on-board LED is connected to the same pin. The only change needed is to the platformio.ini file if you're using PlatformIO to program the board. Un-changed the file is configured for leonardo-compatible boards. Commenting out the leonardo section and un-commenting the a-star section is all that is required to program the a-star.
In either case, there is an on-board LED that provides a pulsing heart-beat, and briefly switches to full-brightness when it moves the cursor.
A few Arduino functions were used, as well as an Arduino library:
Arduino doesn't seem to maintain any timer/counter interrupt libraries/functions. Third-party options are available, but instead the timers used were configured by setting the corresponding registers directly and writing specific functions and interrupt sub-routines.