Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Arduino mouse jiggler for preventing a computer from locking in cases where it is not preventable in software (group policy).

License

NotificationsYou must be signed in to change notification settings

TomasHubelbauer/arduino-mouse-jiggler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repository hosts Arduino code for turning an Arduino Leonardo into a mousejiggler.

What? Why?

A mouse jiggler is a either a hardware appliance of a software program for mousecursor movement automation for the purpose of preventing a computer from goingto sleep. Sometimes software-based solutions are locked down by IT departmentsat which point hardware-based solutions save the day.

Inspiration

There are several projects that implement other peripherials and translate themto mouse inputs, for example:

They all use theMouse.hlibrary that seems to come with the Arduino IDE. Themovemethod in this library moves the mouse cursor relatively to its current positionmaking it ideal for a jiggler implementation.

Code

#include<Mouse.h>voidsetup() {  Mouse.begin();}byte shift =2;byte wait =250;voidloop() {  Mouse.move(shift, -shift,0);delay(wait);    Mouse.move(shift, shift,0);delay(wait);    Mouse.move(-shift, shift,0);delay(wait);    Mouse.move(-shift, -shift,0);delay(wait);}

This code will move the mouse in a diagonal shape, staying around the origin andnot sliding off. The on-board RX/TX LEDs will indicate USB communication, so youknow the board runs and works.

Arduino

According to theMouse.hdocumentation,32u4 based boardsand Due and Zero boards are supported:

These core libraries allow a 32u4 based boards or Due and Zero board to appearas a native Mouse and/or Keyboard to a connected computer.

This means Micro and Micro Pro should work. It didn't for me. I tried:

  • Micro - Windows USB driver did notfind it
  • Pro Micro - Windows USB driver didnot find it
  • Uno - No support for USB HID
  • Leonardo - Worked!I actually had a Freeduino Leonardo, but to the Arduino IDE it's all the same

After flashing the program using the Arduino IDE, the board restarts and startsacting as a mouse immediately. From this point on merely connecting it to thecomputer will power it and make it act as a mouse until disconnected.

While having issues with the Windows USB driver not finding Micro and Micro Pro,I also tried on macOS, but I was unable to flash it on macOS either. The bareArduino IDE install was not enough and I tried installing the driver recommendedby SparkFun:https://learn.sparkfun.com/tutorials/usb-serial-driver-quick-install-/all

But, this article points to an installer they host on their CDN and it is an oldversion which is not signed by Apple and won't work on Catalina.

I found the up to date version onhttps://ftdichip.com/drivers/vcp-drivers. Iinstalled the signed-by-Apple latest version for macOS, but the Arduino IDE didnot show any USB serial ports anyway. I gave up trying to make it work on macOS,but it probably would work for the Uno and the Leonardo, mimicking the issue onWindows.

Raspberry Pi

I've implemented a Raspberry Pi based mouse jiggler in a complementary repo:https://github.com/TomasHubelbauer/raspi-mouse-jiggler

About

Arduino mouse jiggler for preventing a computer from locking in cases where it is not preventable in software (group policy).

Topics

Resources

License

Stars

Watchers

Forks


[8]ページ先頭

©2009-2025 Movatter.jp