Ever wonder what it's like to control things with a crank? This project explores the use of a crank mechanism that attaches to a rotary encoder. With the Adafruit ItsyBitsy M0 and CircuitPython, we can simulate a USB Human Interface Device (HID) device (like computer keyboards, mice, and gamepads) to trigger commands, macros and key presses. This idea was inspired by the Play Date device by Panic.
Hinged Crank Mechanism
Have you ever cranked a rotary encoder? With the right application, this actually feels intuitive and fun. This design features a hinged arm and free-rotating handle. It pops out of the case and hinges out making a crank. The mechanism is a 3D print-in-place design. It press fits over any flat nose rotary encoder.
The rotary encode simulates key presses each time a pulse is produced. By turning the encoder, rapid key presses are generated – This is similar to the "Turbo" button prominently featured on USB gamepads. We've come up with some use cases for this.
- Turn up/down volume or screen brightness
- Play MakeCode Arcade games
- Scroll webpages
- Rotate 3D models in CURA Slicer
DIY USB HID
This project uses the USB HID CircuitPython library. It's designed for creating custom USB input devices for creative and assistive applications. The library supports most US keypresses, multimedia and gamepad controls.
A copy and paste friendly list of parts linked to products page.
If you're new to soldering and CircuitPython, we suggest you walk through the following guides to get the basics.