Dice of Sending
Wondrous Item, uncommon
When a Dungeon Master insists you roll in plain sight, the Dice of Sending offer a clever loophole. These enchanted dice are linked by invisible arcane currents (or Bluetooth, depending on your realm’s tech level), allowing a roll in both the physical and digital planes simultaneously.
Those attuned to the Dice of Sending may appear obedient while still indulging their chaotic good nature—rolling fairly, yet unpredictably.
Preface
This project is still a work in progress and is mostly there but there are still some rough edges.
Join the discussion on Discord (Check the #dice-of-sending channel).
Fairness
With the latest version, I test rolled 210 times
- 1 - 34
- 2 - 31
- 3 - 41
- 4 - 37…
Dice of Sending
Wondrous Item, uncommon
When a Dungeon Master insists you roll in plain sight, the Dice of Sending offer a clever loophole. These enchanted dice are linked by invisible arcane currents (or Bluetooth, depending on your realm’s tech level), allowing a roll in both the physical and digital planes simultaneously.
Those attuned to the Dice of Sending may appear obedient while still indulging their chaotic good nature—rolling fairly, yet unpredictably.
Preface
This project is still a work in progress and is mostly there but there are still some rough edges.
Join the discussion on Discord (Check the #dice-of-sending channel).
Fairness
With the latest version, I test rolled 210 times
- 1 - 34
- 2 - 31
- 3 - 41
- 4 - 37
- 5 - 36
- 6 - 31
Quick Start
Full setup below.
- Solder Seed Studio, battery, and accelerometer together.
- Calibrate dice with
arduino/calibration/calibration.ino - Add calibration values to
arduino/dice_of_sending/dice_of_sending.ino. - Run website with
cd website && npm bootstrap && npm run dev(Or visit Dice of Sending if still hosted.) - Open website, invite friends to a room, connect to dice, start playing board games.
const device = await navigator.bluetooth.requestDevice({
filters: [{ namePrefix: "old-name-here" }],
optionalServices: ["deadbeef-1234-5678-1234-56789abcdef0"],
});
Future Functionality
These are things I’ll maybe do in the future, or you can too!
Low power mode
When the dice aren’t being rolled, go to sleep to save power.
Setup
Tools
- Hot glue gun
- Soldering iron
- Arduino IDE
Parts
- 1×
USB-C cable - 1×
Seeed Studio XIAO nRF52840(Or any Arduino device with Bluetooth) - 1×
BMI160 accelerometer + gyroscope - 1×
3.7V 60mAh 0.22Wh battery - 1x 38cm x 38cm Protoboard
PCB wire
Code
dice_of_sending/— Final Code.bluetooth/— Test bluetooth communication. Upload sketch then open thebluetooth.htmlfile in the browser.acceleration/— Test accelerometer. Upload sketch and openTools → Serial Monitorwith the Arduino software.calibration/— Calibrate dice values. Copy output todice_of_sending/.
Circuit
References
Soldering
- Solder the battery to the microcontroller pads before soldering the microcontroller to the protoboard.
- Solder the following connections between the Seeed Studio XIAO nRF52840 and BMI160 using the references above.
3D Models
- STLs can be found in
cad/. - Onshape models can be found here. Use the V2 Models.
- Print models. I opted for 60% infill.
- Place some hot glue on each of the four corners.
- Place circuit inside.
- Place some more hot glue along the edges of the circuit.
- Hot glue the two halves together.
Website
The site may or may not still be hosted here.
Run locally
cd website- Install Node and npm
- Install dependencies —
npm bootstrap - Start website —
npm run dev
Deploy
- Get a domain.
- Point
website/frontend/src/services/socket.tstowards your domain. - Build
npm run build- This will give you an Express server that runs the socket connection and serves the React app. - Deploy somewhere.
- Enjoy!
Known Issues
These are either bugs in the code or quirks/shortcomings.
Arduino Software can’t find device
Sometimes the device needs to be reconnected a few times before it shows up in Arduino.
Bluetooth Naming
It appears that it takes some time for the browser to recognize a name change of BLE.setLocalName("Arduino"); within the Arduino code. If the device stops showing up and you changed the name, try searching for the old name within the HTML code: