> ## Content Index
> Fetch the complete content index at: https://broddin.be/llms.txt
> Use this file to discover other available public pages before exploring further.

# Creating a digital dice with an M5Core
- URL: https://broddin.be/creating-a-digital-dice-with-an-m5core/
- Published: 2021-01-25T12:00:00.000Z
- Updated: 2026-07-19T19:05:17.000Z
- Author: Tim Broddin
- Tags: m5core, #english, #wordpress, #Import 2024-02-03 13:15, #broddin, #Migrated-1784487752640, #wp, #wp-post, #Import 2026-07-19 19:02

Our eldest daughter Janne loves this game called **Bunny Hop**. This is a game where you take turns drawing cards and advancing the number of squares on them. There is a lot of mayhem going on while you advance your Bunny towards the end.

![](https://broddinblog.on-forge.com/storage/424/4-image-6.png)

This is a great game, with one big frustration: **those cards**. Why not a simple dice? #firstworldproblems.

Nothing a bit of hacking can’t solve. Earlier last week, I ordered a new development board: [the M5Core](https://m5stack.com/collections/m5-core?ref=broddin.be). That’s an **ESP32** (so WiFi, Bluetooth, and a 32-bit dual-core processor) combined with a **320x240px touchscreen**, some buttons, a speaker, and an SD card slot for around 30 euros.

![](https://broddinblog.on-forge.com/storage/425/3-image-7.png)

The M5Core is a **beauty**. It looks much better than anything you can make yourself. There’s no soldering and no wires. Everything is **modular**, and they offer a lot of click-on modules like a battery, GPS, or the Faces plate, which combines battery and extra expansion space. Just click and go.

![](https://broddinblog.on-forge.com/storage/426/1-image-8.png)

If you want to tinker but don’t want to solder or hassle around with breadboards and a thousand wires, this is really great. And it’s very reasonably priced: the M5Core costs 30 euros, the Faces plate with rechargeable battery 11 euros and the dial (with 6 RGB LEDs) 10 euros. That’s reasonably cheap for what you get.

But I started with a problem: replacing those infuriating cards. M5Core to the rescue!

## Making

I scanned the cards with an old scanner:

![](https://broddinblog.on-forge.com/storage/427/image-9.png)

Cut them out in Photoshop and resized to the razor-sharp 320×240:

![](https://broddinblog.on-forge.com/storage/428/image-10.png)

Then I fired up the **Arduino IDE**. I used the big rotary knob because it’s easy for children’s hands, I used it. The code is here:

[https://github.com/TimBroddin/m5core-bunny-hop](https://github.com/TimBroddin/m5core-bunny-hop?ref=broddin.be)

## Remarks:

- The **SDK** that M5Stack created (and the countless examples) is great. This makes developing on their kit really very simple.
- Getting the images in there was easy because the screen can write JPEG directly, and M5Stack provided [a handy script](https://github.com/m5stack/M5Stack/blob/master/tools/bin2code.py?ref=broddin.be) to convert jpeg into an array buffer. Given the 1MB storage capacity of the ESP32, this is a lifesaver.
- I could have used the touchscreen instead of the button, but something tactile makes it feel so much more fun.

## The result

Spending 50 euros on a digital dice is overkill. But my daughter loves it and wants to play the game whenever possible.

Bunny Hop M5Core

\---

There is also a successor to the M5Core: the M5Core2, which adds a microphone and RTC, among other things.

Another fine product is the M5Paper, which combines an ESP32 with an e-ink display and a built-in battery.