InkQuest: Interactive Text Adventure Game Using E-Paper

by Jeremy Ngai in Circuits > Microcontrollers

171 Views, 2 Favorites, 0 Comments

InkQuest: Interactive Text Adventure Game Using E-Paper

InkQuest
IMG_3142.jpg
IMG_3156.jpg
IMG_3159.jpg

After I had been working with e-paper displays for a while, I noticed most e-paper projects are just a static display that updates once in a while, like a weather station or calendar tracker despite their sleek beauty and low power capability. Inspired by e-readers, I thought: why not make something interactive, something fun, and something handheld?

That is the reason behind InkQuest. You not only can read, but you also get to immerse yourself in the story. This way, we bring the classic choose-your-own-adventure into a modern handheld gaming console.

This is an interactive text adventure (choose-your-own-adventure) e-paper game with:

  1. 2.9" E-Paper Display (zero eye strain!)
  2. Tactile, clicky rotary encoder and RGB LED matching the story atmosphere
  3. Handheld slim design (just 1.6cm!)
  4. 1,200mAh battery (~20 hours of use, based on estimation)
  5. and a sleek design!

The story is basically infinite.


In a nutshell, this is how the game flow works:

  1. You turn or push the rotary knob to navigate the controls and choose story choices.
  2. The ESP32 checks the history buffer (last 5 turns) and make a new JSON payload.
  3. The buffer and your choice are sent to Gemini API to process the prompt. Then it returns the new story segment and 4 choices.
  4. The ESP32 parse the JSON response and saves the story to the buffer.
  5. The e-paper display updates the story text and 4 choices, and the LED changes colour to match the atmosphere.
  6. After 2 minutes of inactivity, the ESP32 falls into deep sleep; simply pressing the rotary encoder would wake it up.


  1. Notice how the NeoPixel next to the rotary encoder shifts color matching the scene!

Supplies

IMG_3085.jpg

You'll need these to build InkQuest:

Electronics

  1. WeAct 2.9" Black White E-Paper Module - AliExpress
  2. Seeed Studio XIAO ESP32-C3 Development Board - AliExpress
  3. 603450 1200mAh Li-Po Battery - AliExpress
  4. JST-PH Connector Male 2 Pin - AliExpress
  5. JST-PH Connector Female 2 Pin - AliExpress
  6. Rotary Encoder EC11 20mm D shaft - AliExpress
  7. WS2812B NeoPixel LED 5050 - AliExpress
  8. PH3.5 Low Profile Pin Connector (2x4 Male, 2x4 Female) - AliExpress
  9. 0805 Resistor (2x 1M, 1x 330, 3x 10K) - AliExpress
  10. 0805 Ceramic Capacitor (1x 470nF, 1x 100uF) - AliExpress

Printed Parts

  1. Top case
  2. Lid

Additional Tools

  1. Soldering iron (the one I use ->) - AliExpress
  2. Tweezers - AliExpress
  3. Kapton tape - AliExpress
  4. Double-sided tape - AliExpress


Let's get started building!

3D Print the Case and Lid

IMG_3077.jpg
IMG_3080.jpg
IMG_3083.jpg
Screenshot 2026-10-22 132824.png
Screenshot 2026-10-22 132848.png

The case is separated into 2 parts: the case and the lid.

Since I don't have access to a 3D printer, I outsourced them to JLCPCB alongside my PCB. However, you can also print it yourself if you have one. I chose the 8001 Translucent Resin for the print. Because this resin option doesn't include sanding or any finish, some support marks were visible, so I lightly sanded the enclosure to remove them.

I designed all the parts in Autodesk Fusion. The 3D model files are below!

PCB Design

inkquest_schematics.png
inkquest_pcb_layout.jpg
IMG_1143 (2).jpg

I designed the PCB in EasyEDA to convert my initial breadboard prototype into a PCB to save space. The PCB include the ESP32, rotary encoder, NeoPixel LED, battery connectors, and the e-paper connector. Also with the great wave PCB art in white silkscreen. I ordered my PCB from JLCPCB. You can find the Gerber files below in my Google Drive link.

Google Drive: Gerber

Assemble & Solder PCB Components

IMG_2949.jpg
IMG_2954.jpg
IMG_2951.jpg
IMG_2952.jpg

The first step in building the circuitry part is soldering the PCB components. Grab your soldering iron and start with the small resistors and capacitors, then move on to the bigger through hole components. For the JST connector, I bent the pin so it faces down toward the board.

Solder E-paper Pin Header

IMG_2937.jpg
IMG_2938.jpg
IMG_2939.jpg

The e-paper module came with a pre-soldered connector on the PCB. However, I would like to use the through-hole pins instead to save space for the battery. So we will need to desolder the connector first, then solder our low profile pin header.

First, grab your soldering iron to heat up the pins and use tweezers to carefully remove the connector. Be extra careful with the delicate traces. If the pads are damaged, even if we use the through-hole pins, the connection is broken, and reconnecting is misery (speaking from experience!).

Then, grab the low profile pin header and solder it through the holes.

Oh yeah, you might be wondering why I chose the low profile pin header instead of a common pin header. It's because we're sandwiching the battery between 2 PCBs (the e-paper and the main PCB), I find the common pin header's gap massive (9mm), so fitting a 6mm battery would waste space and leave awkward spacing. So I spent hours finding those low profile pin header that has a gap of only 6.5mm. It perfectly fits the battery!

Mount E-paper

IMG_3091.jpg
IMG_3088.jpg
IMG_3092.jpg

After the e-paper connector is ready, we now attach it to the case first. Then we will prepare our PCB.

I designed these little clips on the side to lock the e-paper PCB in place. Since there isn't much space, I had to place the clips on the corner side, which isn't the most ideal placement, but I guess it is better than nothing. To remove the e-paper in the future, we can just slightly flex the resin case.

Now let's move on to the PCB part!

Solder Battery Connector

IMG_2925.jpg
IMG_2926.jpg
IMG_2928.jpg

Now moving on to the battery:

Since we are using a JST connector for the battery, we need to attach a male connector to the battery wires.

First, peel off the Kapton tape originally on the battery. Then grab your soldering iron to desolder both wires. It's a live battery, do NOT short circuit! Then we solder the JST connector wire (trim to approx. 7 cm) onto the battery, be aware of the polarity. After we're done, we secure it back with Kapton tape.

Now we're done with the battery, it's time to mount it onto the PCB!

Mount Battery on PCB

IMG_2941.jpg
IMG_2940.jpg
IMG_2943.jpg

On the PCB, there is a dedicated marked spot for the battery where we will mount it.

First off, apply double-sided tape to the back of the battery (or any adhesive you prefer) and press it firmly into place. Ensure that the battery lines up with the PCB.

You should be able to connect the battery connector, but for now, don't plug it in yet.

Flash Code to ESP32

Screenshot 2026-10-19 132733.png
IMG_2955.jpg

After we are done with the PCB, we can flash our ESP32 with our code. So plug it into your computer!

We will use Arduino IDE to flash the code. Download the .ino code file below or from my GitHub repo. Firstly, make sure you have all the necessary libraries installed:

  1. GxEPD2
  2. Adafruit Neopixel
  3. WiFiManager

Before we upload the code, make sure to set the ESP32 partition scheme to 'Huge APP', since the code is quite big. Also, check 'Erase All Flash Before Sketch Upload' if you have any past project to prevent flash override.

Mount ESP32 Antenna

IMG_3095.jpg
IMG_3096.jpg
IMG_3093.jpg

Before we assemble the e-paper and the PCB, one last thing is to attach the WiFi antenna.

First, connect the tiny UFL connector to the ESP32 board. Then we peel off the adhesive tape and stick it onto the top left of the case lid.

Attach E-paper and PCB

IMG_3098.jpg
IMG_3097.jpg

The last step is to assemble the whole thing. Since the e-paper and the PCB are done, it's time to bring them together.

First, we connect the battery connector to power it up, then we just need to connect the e-paper pin to the PCB. Finally, snap on the lid to the case and attach a knob you like for the rotary encoder.

Press the rotary encoder a few times and it will come alive!

Test & Have Fun!

IMG_3103.jpg
IMG_3101.jpg
IMG_3102.jpg
IMG_3107.jpg

When we power it up for the first time, we need to setup our WiFi and also our Gemini API key. If you don't have one yet, you can generate one in Google AI Studio. We will be using Gemini 3.1 Flash Lite which is super quick and has tons of free usage (500 free requests per day).

You will be prompted to 'configure WiFi'. Simply use a phone (or whatever) to connect to the hotspot which will open a captive portal where you will be able to enter your WiFi details and API key. This way, setting up InkQuest is very intuitive and safe, thanks to the WiFiManager library.

Once it successfully connects, it will generate a story and choices for you. And you can start playing!

Conclusion

InkQuest_
IMG_3142.jpg
IMG_3156.jpg
IMG_3159.jpg

And that is how you make your own text adventure game that you can fit inside your pocket. It's pretty much like an e-reader, but you choose to customise your story!

If you made one (maybe a Halloween themed one?), please submit your final product to the 'I Made It' section, because I would love to see it!

Thank you for following along with this build. I hope you enjoyed building it as much as I did! Bye for now!