/Mouse-Jiggler

Primary LanguageAssemblyCreative Commons Zero v1.0 UniversalCC0-1.0

Mouse Jiggler

A hardware based Mouse Jiggler that prevents your computer from going to sleep.

Why

You can buy mouse jigglers on amazon for $10, however they are kind of dumb and limited.

  • Moves mouse 1 pixel every second
  • Predictable pattern could be tracked
  • Fragile (They reppordely die often)

Some mouse jigglers also prevent OSX from unhiding the dock since the mouse doesn't remain still enough to be considered 'hovering'

Some jigglers also trigger OSX's feature 'shake mouse pointer to locate' which causes the mouse to always be huge

Vision

What if you could make a mouse jiggler that:

  • Moved at random intervals (between 1 and 10 minutes)
  • Was more reliable
  • Cost less than $10
  • Didn't interfere with hovering over OSX dock
  • Didn't activate 'locate my mouse on OSX'
  • Has a LED to show when it is moving

This repo contains code for a Digispark mouse jiggler, but could be modified to work with any microcontroller able to emulate a HID device (Anything Atmega 32u4 processor (easy) or anything capable of running V-USB (advanced) )

  1. Digispark
  2. Adafruit NeoKey
  3. Arduino Pro Micro (32u4)
  4. Teensy
  5. Adafrit Trinket M0

This repo contains code for Digispark. It should be simple to add support for other devices.

What you need

  1. Digispark Amazon
  2. USB 2.0 hub or USB Extension cable (OSX wont reliably upload firmware to digispark on USB 3.0 ports micronucleus/micronucleus#131 )
  3. VsCode + Platform.io installed on your computer

Installation

  1. Open vscode + platform.io and click build + upload

You will get a prompt like

> Please plug in the device (will time out in 60 seconds) ... 

At this point, unplug and replug in the digispark within 5 seconds. It should automatically upload. If it fails to upload, try a different USB 2.0 hub or add a usb extension cable. See [firmware update instructions below](## micronucleus firmware upgrade)

Additional information

Digispark tutorial Digispark tutorial2

Device will show up as

1EA7/0064:  - 2.4G Mouse
  vendorId:      0x1EA7
  productId:     0x0064
  usagePage:     0x0001
  usage:         0x0002
  serial_number:  

To change the name, modify patches/usbconfig.h.patch

Revert to origional

patch -R lib/DigisparkMouse/usbconfig.h < patches/usbconfig.h.patch

Then modify patches/usbconfig.h.patch

Then apply the new changes

patch lib/DigisparkMouse/usbconfig.h < patches/usbconfig.h.patch

trackpad image

Troubleshooting

My Digispark doesn't show up on windows

A: See this stack overflow answer

micronucleus firmware upgrade

Clones of digispark come with old firmware

Follow these instructions to upgrade

~/Downloads/micronucleus-cli-master-882e7b4a/micronucleus --run ../firmware/upgrades/upgrade-t85_default.hex