torvalds/ScrollWheel — reverse-engineered prompt
Reverse engineered prompt
Build me a small firmware project for an RP2350 board that turns a magnetic rotary sensor into a USB control knob. I want to use an AS5600 angle sensor over I2C, plus a few simple buttons wired to GPIO and ground, so the device can plug into a computer and act like a volume knob or scroll wheel.
Keep it minimal and easy to modify, since different boards use different pins. Please make the I2C pins, button pins, and LED behavior easy to change. If there is a WS2812 RGB LED, use it for simple visual feedback while testing, but don’t make the LED required for the main knob to work.
Set up the basic build files for the Pico SDK, include the USB behavior, read the sensor smoothly, debounce the buttons, and make the knob send useful control events to the computer. Look up current RP2350 and Pico SDK docs online if you need to.
Want more depth? Deep Reverse