Hardwareby C Forde · HacksterA pocket dice roller with a rotary knob and a 3D-printed shell
An Arduino sketch turns a Seeed XIAO RP2040 and a tiny OLED into a dice roller, coin flipper and life counter you spin with one knob.
Build sheet
- Controller
- Seeed XIAO RP2040
- Display
- 0.96in OLED SSD1306
- Input
- Rotary encoder + push
- Language
- Arduino C++
Can I build this?Intermediate · AI 4/5 · $25–45
- Difficulty
- Intermediate
- AI-buildability
- 4/5
- Time
- A weekend
- Cost
- $25–45
The firmware is an Arduino sketch with common libraries that AI tools can write easily, and the hands-on work is light soldering and printing a case from provided files.
Based on "A pocket dice roller with a rotary knob and a 3D-printed shell" on Afterware: https://afterware.xyz/p/a-pocket-dice-roller-with-a-rotary-knob-and-a-3d-printed-shell
Write an Arduino sketch for a Seeed XIAO RP2040 driving a 128x64 SSD1306 I2C OLED and a rotary encoder with a push button. Build a menu that lets the user pick a D4, D6, D8, D10, D12, D20 or D100 die to roll, flip an animated coin, or adjust a life counter from -999 to 9999. Seed the random generator from an unused analog pin and the RP2040 temperature sensor. Use U8g2 for drawing and the Arduino-Pico core for the build.
Estimates based on the original write-up. How AI-buildability is scored. Building with an AI assistant? Connect it to Afterware (free MCP server).
Story
Forget the phone. no_DICE is a handheld with one clickable rotary encoder and a 0.96-inch 128x64 OLED that rolls D4 through D100, flips an animated coin, and tracks life totals from -999 to 9999. Turn the knob to pick a die, press to throw it. The coin flips two to four times before landing, so you can't read the result off the first frame.
The firmware runs on a Seeed XIAO RP2040 with the Grove Shield for XIAO, which handles power management for a 3.7V LiPo. The menu is built with the GEM library and drawn with U8g2, and KeyDetector turns the encoder into a proper input device. The random seed mixes noise from an analog pin, the RP2040's temperature sensor and battery voltage. Battery monitoring needs a voltage divider made from two 100k resistors soldered to the shield.
The whole thing is free and open source, and the enclosure is 3D-printed from provided STL files, with Fusion (.f3d) and STEP files for editing. If you want a weekend project that also doubles as a 3D-printing exercise, this is a clean one. The sketch is also a usable reference for GEM menus, and the frame can house a different board entirely."
Hardwareby C Forde · Hackster
Videoby AncientJames · Hackaday











