I really enjoyed getting my first PyBadge because it gave me a way to make my own arcade games using https://arcade.makecode.com. I did find that, I actually like making the games even more than playing them, so I thought about ways to have someone (or something) else play the game.
I'd heard about the idea of "mouse jigglers" - mechanical or software cheats to make it look like you were busy working on a computer when you weren't, and I knew CircuitPython supported HID (Human Interface Device) so I could send keystrokes. So why not "let C3P0 take the wheel"?
That led to my simple "mouse jiggler" for playing arcade games in a browser. (https://en.wikipedia.org/wiki/Mouse_jiggler) (Yes, this actually is a keyboard jiggler that randomly "fires" by sending spaces, and maneuvers by randomly sending cursor keys up, down, left and right.)
Designed to take over playing a simple arcade game in a browser, for example: https://makecode.com/_JfAKKf2EUcLv This game lets you steer the Millenium Falcon, and shoot asteroids and Star Destroyers.
Touch #1 on the NeoTrinkey to fire lasers, and touch #2 to toggle on/off a random "jiggler" that continuosly moves the ship around, randomly shooting.
Touch #1 and #2 together to end program.
Flashes green when autopilot is engaged, and red when it ends. Ending program flashes gold.
Program file:
AutoPilot.py - copy to code.py on the neotrinkey.
Github repo HERE
IMPORTANT NOTE: Programming something like this, using the HID interface can be tricky, as having a program randomly spewing spaces, and cursor keys will mangle any text you are editing. When I wrote this, the initial testing had touching #2 just call the jiggle() function. That way I didn't have a program going crazy and messing with the program text. Once it was working, it was safe to build the loop that would continuously call jiggle() and shoot().
This page (C3P0, Take the Wheel!) was last updated on March 06, 2025.