I'm pretty nostalgic about old game consoles like the Atari 2600, and for years I've been wondering why I can't play games like Breakout or Kaboom! or Warlords with a proper paddle controller, so I set out to find out what I can do about it.
This project is the beginning of that adventure.
Basically, this is some arduino code that I installed into an Adafruit Keeboar 2040 which is based on and RP2040. Some time in the near future I'll build a more generic version using the RP2040.
Anyway, the gist of it is, you'll need a 10K potentiometer with ground on one outer lug and 3.3vdc on the other outer lug. The wiper is wired to one of the analog input pins on the kb2040.
The analog signal you get from the potentiometer is your paddle rotation. It's all in the code.
The reason this script is so huge is because I had to experiment with a bunch of modes to see what works where. But basically, just use the default mode.
Unfortunately it only works on basically on or two devices using one specific OS. I got it working on an Anbernic RG350xxH and RG40xxH running MuOS Banana.
For some reason, using that specific OS and whatever version of retroarch they use, it works great with the paddle. Every other software, OS compbination I've tried maps the paddle as if it's a joystick so it control velocity which is wrong.
The paddle is supposed to map directly to the position of the paddle.
Anyway, this would make more sense in a video and I'll post a schematic of my circuit soon.
Oh I forgot to mention I had to add a bunch of buttons to this paddle because when I switch to this device in retroarch I can't use the buttons on the anbernic so I needed a way to navigate out of the retroarch menus to play the game, thus all the dang buttons.
In this image I'm running a gametank game using the GameTankEmulator which has native support for my paddle because I programmed it that way ;)