Code & Annoy Your Friends For April Fools

Auto-Mouse-Moving via USB App

Gant Laborde
Red Shift

--

We all love annoying our co-workers. I used to notoriously put tape on any new co-workers’ mouse. But it’s time to put away the ways of childhood, and graduate to buying custom hardware, writing code, and bringing your prank to the next level.

mouse teleportation!

In this blog post, I’ll show you how to write and deploy a simple application that teleports the mouse pointer 75 pixels every minute. While this seems minor, and hardly noticeable, it’s the perfect amount of “annoying” to slowly take root and substantially affect a person’s day. If you’re sitting near them, the hardest part will be not to laugh while they reboot and swap out their mouse to fix the issue.

I can only imagine how annoyed they’d be if you let the prank continue across multiple days.

Believable Reenactment

The Goods

We’ll make a small USB device pretend it’s a computer mouse, and teleport the pointer on a 60 second delay.

Hardware

For the USB devices, I’ve chosen the beautiful, and extremely affordable Neo Trinkey by Adafruit.

Why chose the Neo Trinkey? Well, not only does that low $6.95 price tag work great for pranks, it’s also just a COOL DEVICE! While we’ll only be using the simplest features of this device, you will get to dive into a friendly world programmable hardware.

The Neo Trinkey has 4 individually addressable RGB LEDs, and two touch sensitive edges (like buttons). If you weren’t using this for a prank, you could write some cool code to light up the LEDs depending on your local weather, or crypto market, or whatever! There’s no limit to the fun and exciting world of programmable hardware like the Neo Trinkey.

Software

We’ll be writing our code in Python. Yes, we could simply write the code in Arduino style with a (C/C++) flavor, but Python is the second-most popular programming language, and it’s far more readable and friendly.

We’ll convert our Adafruit Neo Trinkey into a Circuitpython device so we can write a simple Python loop to move the mouse every 60 seconds.

Overview

Buy a Neo Trinkey

Once you have your Neo Trinkey, we will convert it to use Python code by installing Circuitpython.

Get correct CircuitPython for the neopixel trinkie https://circuitpython.org/board/neopixel_trinkey_m0/

Follow the steps for CircuitPython. This will allow us to write amazing Python code for the device rather than the C/C++ dialect of most Arduino devices.

They suggest the Mu editor for making files on the device, but if you’re using something more modern like VSCode, then you’re fine. Since this is copy/paste you could use any simple text editor.

While there’s all kinds of neat examples already in place by Ada Fruit, and these are worth exploring, the code you’re going to need for the April Fools prank is here:

That’s it! Once this file is processed on the Trinkey it will work! You just plug the USB device into your victim’s computer and relax.

They won’t notice anything at first, but every so often it will jump right when they’re trying to click on something and that’s when you’ll hear their frustration 😅

Super Evil April Fools Mode

That strange USB device poking out of a computer can be found pretty quickly. So be sure to plug it in the back… OR… you can plug it directly into the motherboard inside the case!

With just a little hardware you can conceal the Trinkey directly against the motherboard.

Prank responsibly!

My coworkers have strong feelings about some of this :D

Playing pranks should only be enjoyed if everyone involved is laughing in the end. One coworker Trevor Coleman suggest that a prank should only last until noon, and then it must be revealed. Whatever you do this April Fools day, make sure everyone is having fun ❤

If you enjoyed this article (and you don’t plan on buying a Trinkey and causing havoc), please share it with your friends!

Gant Laborde is a co-owner and Chief Innovation Officer at Infinite Red, published author, adjunct professor, worldwide public speaker, and mad scientist in training. Clap/follow/tweet or visit him at a conference.

--

--

Software Consultant, Adjunct Professor, Published Author, Award Winning Speaker, Mentor, Organizer and Immature Nerd :D — Lately full of React Native Tech