The Atmega 32U4 chip has the capability of emulating a mouse and keyboard through the USB port.
With boards like the Olympia CircuitsArno
, Arduino Leonardo or Sparkfun Micro, you can use this capability to have some fun. We've used it to draw words and images in a paint program and enter repetitive text in forms. This project is a little more fun.
I wrote a simple sketch
that takes advantage of this to annoy your friends (or enemies). There are several options in the sketch that can be selected and combined to get the effect you want.
Basically, you set a time factor and the type of action to have the cursor do when the time comes around. I made a Jitter routine that "shakes" the cursor and a Jump routine the moves the cursor across the screen. You can add a beep to those to add to the mystery.
Plug your board into a USB port on the back of a PC or a USB hub that's out of the way and wait for the confused looks. "Maybe it's a dirty mouse ball", "Are my eyes deceiving me?"...
With most computers you can plug the Arno in and the mouse and keyboard drivers will start working. There may be a few driver install pop-ups in Windows, but it will eventually start working.
This trick will work with other boards that have USB built in, such as our LeOlympia, the Arduino Leonardo, Sparkfun Micro and so on..