Dungeons and Dragons Hit Point Tracker With E-Ink Display




Introduction: Dungeons and Dragons Hit Point Tracker With E-Ink Display

I wanted to create a hit point tracker that displays all of the players hit points in a normalized scale, so you can see exactly who needs healing the most and how poorly the whole party is doing. It connects via Bluetooth to an Android phone which displays all the buttons you need to control your party's status. It's powered by a replaceable 9V battery. The current state is saved to EEPROM so you can swap out the battery without losing everyone's current hit point values.


Components needed

  • Arduino Mega 2560
  • HC-06 Bluetooth module
  • 400x300, 4.2" E-Ink Display Module
  • RobotUI app from the Google Play Store
  • 3 resistors. Any value, but they all need to be the same value.
  • 9V battery
  • 9V battery connector
  • Wires and solder
  • (optional) Some kind of case.
  • (optional) Power switch. You could just remove the battery, but a switch is more convenient.
  • (optional) Cylewet 55 breadboard. If you hate soldering as much as me.


  • Probably a soldering iron
  • Wire cutter
  • (optional) 3D printer for case

Step 1: Construct Your Circuit

Some links for various components...

Arduino Mega 2560, https://www.amazon.com/SunFounder-ATmega2560-16AU...

HC-06 Bluetooth module, https://www.amazon.com/s?k=hc-06&i=electronics

400x300, 4.2" E-Ink Display Module, https://www.amazon.com/4-2inch-Module-Communicati...

RobotUI app from the Google Play Store, https://play.google.com/store/apps/details?id=com...

STL files... https://cults3d.com/en/3d-model/gadget/case-for-h...

Wire up the components as shown in the Fritzing wiring diagram. If, like me, you are terrible at soldering and prefer to use breadboards when you can, then you can get a small enough breadboard that will fit inside a case. I used a Cylewet 55 breadboard (https://www.amazon.com/Cylewet-Solderless-Circuit-...)

You can skip using a switch for the power if you want to wire the battery straight to the Vin on the Arduino, but you'll have to add/remove the battery to switch it on/off. You only need to switch it on at the start of a game session, so this is viable.

You don't need the battery connected if you are powering the Arduino Mega using the USB cable for programming, so it's best to remove it for the next step.

Step 2: Upload Code to Arduino

Create a directory called "HPTrackerEInk" and place the attached HPTrackerEInk.ino file into it.

If you compile it you will likely get errors until you have installed the epd4in2.h library from Waveshare that comes with you e-Ink display. I downloaded it from here https://www.waveshare.com/4.2inch-e-paper-module.h.... If you get problems with that library, then add a comment below and I can give you a copy of the specific ones I have (I fixed some errors, I contacted Waveshare and they promptly fixed the issues)

You will also need to install the libraries that communicate with the RobotUI app. Google "RobotUI setup guide" or just go here http://www.bigbagofbits.com/robotui/

At this point you should be able to compile HPTrackerEInk.ino with no errors, you can upload your code and test everything works.

You'll need to change the list of names so it contains the names of all your friends characters. Within HPTrackerEInk.ino you'll notice a variable called nameOptions with a list of 20 names. You can change this list to contain whatever names you want, but note, only the first 5 characters are displayed below the hit point graphic on the e-Ink display. However many names you place in the nameOptions array, you will need to change NUM_ID_OPTIONS to reflect that number. So if you only have 10 names, change NUM_ID_OPTIONS from 20 to 10.

If you are lucky enough to be involved with more than one campaign, I've provided a way to switch campaigns. The UI has a drop down menu to select which campaign you are currently playing. So you can set up and track different party's. You can change the names of the three available campaigns by changing the contents of the option0, option1 and option2 variables.

Once you have compiled and uploaded to your Arduino Mega. Start up the RobotUI app and connect to your device! That's it! You can start playing Dungeons and Dragons and track your party's hit points!

COMMUNICATE: This is probably the hardest step for those of you who haven't been programming Arduino's for long, so don't be afraid to ask questions in the comments. I likely glossed over something that needs a more detailed explanation for some people, so please let me know. That goes for the other steps too.

Step 3: Cram It Into a Case (optional)

You can download the STL files from here https://cults3d.com/en/3d-model/gadget/case-for-hi...

I created a case that doesn't use screws as I never have the right sized screws for other people's STL creations. It also avoids the whole imperial vs metric problem. So instead the case clips into place and you need to two pieces of wire (which I assumed everyone has) or cable ties that slips through two holes just inside the battery compartment. The hole threads through the three case segments. Twist the wire or lock the cable ties so the case stays in place. If you need to re-open the case then untwist the wire or cut the cable ties!


1 Person Made This Project!


  • First Time Author Contest

    First Time Author Contest
  • Halloween Contest

    Halloween Contest
  • Metal Contest

    Metal Contest



2 years ago

I'm having trouble with the libraries. I'm not super proficient with Adruino, but have used it with 3D printers I've had in the past. I was able to import the RobotUI library, but when I try to compile I get an error message about the display libraries not being present. I went to their website and then to the github website to get the epd4in2.h files but after obtaining the two required files, I'm getting "HPTrackerEInk:13:21: error: epd4in2.h: No such file or directory". Where am I supposed to put those files? Are there more than the two that are required?


Reply 2 years ago

Hi Scott, I've added a WaveShare.zip file to Step 2 above. You might need to refresh your browser before it appears. If I remember correctly I used the Arduino IDE to install that zip, with the Sketch->Include Library->Add zip library. Then it ended up in my Arduino install directory within the libraries folder. There are a dozen files in that zip, including the header you mentioned. Let me know if that changes anything, or if any instructions need clarification. I'll update step 2 when we've got you compiling.


Reply 2 years ago

Hi Scott. I'll zip up my waveshare files that I downloaded a while ago and add them to instructables (I'm sure they wont mind). Let me just try that and then we'll get that library installed correctly into your arduino IDE. Hold on!


2 years ago

Thanks @seamster!
UPDATE 2019-05-28: I updated HPTrackerEInk.ino. No real change, I just removed some unused code. I also added a version number in the header comment, so you can determine which version you have (v1.0)


2 years ago

Very nice! :D