// the find
torvalds/ScrollWheel
Minimalist RP2350 magnetic sensor scroll wheel toy project
A personal hardware toy from Linus Torvalds: plug an AS5600 magnetic angle sensor and a few switches into an RP2350 board and get a USB HID scroll wheel or volume knob. It uses the RP2350's PIO subsystem for WS2812 LED driving and switch debouncing, with TinyUSB underneath for HID. Interesting mainly as a starting point and as a window into how Torvalds writes bare-metal C.
Using PIO for hardware debounce (debounce.pio) rather than polling or timer callbacks is the right call on RP2350 — it keeps timing deterministic without burning a core. TinyUSB is a solid choice for HID; the hid-device.c split from the sensor logic keeps concerns reasonably separated for a toy. The AS5600 is a genuinely good part for this use case — absolute magnetic angle, I2C, no contact wear. And the README is refreshingly honest: it says 'don't expect anything polished' and means it.
GPIO assignments are hardcoded for a specific board and the README documents this without fixing it — you will need to edit board.h before anything works on your hardware. The WS2812 PIO path is present but will break silently on boards with a dumb RGB LED (like the Pimoroni Tiny 2350 it mentions), and there is no conditional compilation to handle this. Twelve forks after several months suggests almost nobody has taken this further, so if you hit a problem you are on your own. pico-sdk and tinyusb are both git submodules, meaning your first clone is a several-hundred-megabyte surprise.