Skip to content
Spuddya7xPublic

About

ORE mining stats display for the LilyGo T-Display-S3 (NerdMiner V2 hardware)

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

esp32-ore-display

A standalone ORE mining stats display for the LilyGo T-Display-S3 (also sold as the NerdMiner V2 hardware). Polls public APIs and surfaces miner stats, portfolio value, ORE price, and the current motherlode pool on a 1.9" ST7789 screen — no host PC required. Track a single wallet or up to 20 — stats and portfolio are summed across all of them.

🚀 New here? Jump to the step-by-step setup guide ↓ — a zero-experience walkthrough for flashing the firmware (Arduino IDE, libraries, screen config, first boot).

Miner stats screen

Features

  • First-boot Wi-Fi setup via captive portal — connect your phone to the device's AP, fill in your SSID / password / wallet(s), hit save.
  • Multi-wallet — track 1–20 Solana addresses (one per line in setup). They're polled round-robin so the UI never stalls, and the figures below are aggregated across all of them.
  • Six pages cycled with the buttons:
    • STATS — rounds played, rounds won, ORE held, net cost (SOL/ORE) — summed across all wallets.
    • PORTFOLIO — summed USD value (held ORE × price), 24 h price-driven $ delta, 24 h holdings delta.
    • PRICE — ORE/USD, 24 h change, ORE/SOL ratio.
    • ML POOL — current motherlode pool size and its USD value.
    • MOTHERLODE — the latest motherlode win, with ORE summed across every wallet that won that round.
    • TOP MINER — the most recent top-miner win across all wallets.
  • Top-button gestures (action fires on release, hint overlay shows mid-hold):
    • < 1 s → next page
    • 1–3 s → rotate display 180°
    • ≥ 3 s → toggle backlight on/off
  • Bottom button → previous page.
  • Both buttons 5 s → reset to setup. Clears the tracked wallets but keeps your Wi-Fi (credentials are pre-filled when the portal reopens). To wipe Wi-Fi too, use the Clear saved Wi-Fi button on the setup page.
  • Wake-on-press: backlight off + any press just turns it back on.
  • Persistent rotation across reboots (saved to NVS).
  • No hard-coded credentials in the source — everything user-specific is provisioned at runtime.

Screens

Stats Portfolio
STATS — rounds played/won, ORE held, SOL/ORE net cost (summed across wallets). PORTFOLIO — summed USD value, 24 h $ delta, ORE held.
Price Current Motherlode
PRICE — ORE/USD, 24 h change, ORE/SOL ratio. ML POOL — current motherlode pool size + USD value.
Motherlode win Top miner win
MOTHERLODE — latest motherlode win, ORE summed across every wallet that won that round (badge shows how many). TOP MINER — most recent top-miner win across all wallets.

Hardware

  • LilyGo T-Display-S3 (ESP32-S3, 170×320 ST7789, two side buttons). Identical to the NerdMiner V2 board.
  • USB-C cable.

Software prerequisites

  • Arduino IDE 2.x with the ESP32 Arduino core 3.x installed (tested on 3.3.8).
  • Library Manager → install:
    • TFT_eSPI by Bodmer (≥ 2.5.x)
    • ArduinoJson by Benoit Blanchon (≥ 7.x)
  • The remaining libraries (WiFi, HTTPClient, WiFiClientSecure, Preferences, WebServer, DNSServer, FS) ship with the ESP32 core.

Build & flash

  1. Configure TFT_eSPI for the T-Display-S3. The repo includes a ready-made User_Setup.h matching this board. Copy it into your TFT_eSPI library folder, replacing the default file:

    <Arduino sketchbook>/libraries/TFT_eSPI/User_Setup.h
    

    (Or edit User_Setup_Select.h in the library to #include this repo's file directly.)

  2. Open esp32-ore-display.ino in the Arduino IDE.

  3. Board settings:

    • Tools → Board → ESP32 Arduino → LilyGo T-Display-S3
    • Tools → Partition Scheme → 16M Flash (3MB APP / 9MB FATFS)
    • Tools → USB Mode → Hardware CDC and JTAG
    • Tools → USB CDC On Boot → Enabled
    • Tools → Erase All Flash Before Sketch Upload → Disabled (so your saved settings survive re-uploads).
  4. Hit Upload.

First-time setup (captive portal)

Setup mode

On a fresh flash (or after a factory reset) the device boots into setup mode:

  1. The screen shows SETUP MODE with an SSID like ORE-Display-AB12 and an IP (192.168.4.1).
  2. On your phone: connect to that open Wi-Fi network. Most phones will pop a "Sign in to network" banner automatically — tap it.
  3. Fill in:
    • Your Wi-Fi SSID and password
    • One or more Solana wallet addresses (or managed miner authorities), one per line — up to 20. Stats and portfolio are summed across all of them.
  4. Hit Save & Connect. The device persists everything to NVS and restarts.

On subsequent boots the device skips setup and connects directly.

Daily use

Gesture Action
Top button click (< 1 s) Next page
Top button 1–3 s hold Rotate display 180° (persisted)
Top button ≥ 3 s hold Toggle backlight on/off
Bottom button click Previous page
Both buttons 5 s hold Reset to setup — clears wallets, keeps Wi-Fi (re-enters captive portal)
Any press while backlight off Wake (consumes the press)

The reset countdown shows on-screen while you hold both buttons; release before 5 s to cancel.

Factory reset countdown

Configuration

User-tunable values live in config.h:

  • POLL_*_MS — API poll intervals.
  • BTN_LEFT_PIN, BTN_RIGHT_PIN, BACKLIGHT_PIN — hardware pins.
  • RESET_HOLD_MS, ROTATE_HOLD_MS, DISPLAY_HOLD_MS — gesture thresholds.

User-specific values (Wi-Fi, wallet) are not in source — they live in NVS and are set via the captive portal.

Re-uploading firmware

NVS lives in a partition separate from the application binary, so a normal Arduino upload (with Erase All Flash Before Sketch Upload set to Disabled) leaves your saved settings intact. Ways to clear stored data:

  • Hold both buttons 5 s on the device → clears the wallets and reopens setup, but keeps Wi-Fi (pre-filled).
  • On the setup page, tap Clear saved Wi-Fi to wipe Wi-Fi credentials as well.
  • Tools → Erase All Flash Before Sketch Upload → Enabled for one upload, then back to Disabled (wipes everything).
  • Temporarily add clearConfig(); ESP.restart(); to the top of setup(), flash once, remove (wipes everything).

APIs used

  • api.ore-stats.com — maintained by kriptikz:
    • /miner/{wallet} — held ORE (rewards_ore + refined_ore) and lifetime SOL (lifetime_rewards_sol, lifetime_deployed).
    • /history/miner/{wallet}/stats — round counts (rounds_played, rounds_won).
    • /history/miner/{wallet}/deployments — motherlode / top-miner win highlights.
    • /treasury, /history/rounds — current motherlode pool and latest round id.
  • api.jup.ag — ORE and SOL USD prices via Jupiter aggregator.

Both are public and unauthenticated.

Files

esp32-ore-display.ino   Main firmware (single .ino — pages, polling, portal, gestures).
config.h                Build-time constants (pins, poll intervals, hold thresholds).
User_Setup.h            TFT_eSPI configuration for the T-Display-S3 board.
preview_logo.py         Renders the on-device ORE logo at 1:1 pixels (PIL).
render_screens.py       Renders mock screenshots of every page; pulls live market
                        data from the same APIs the firmware uses. Use --offline
                        to skip the fetch. Mock values for wallet-specific data
                        live at the top of the file.
screenshots/            Output of render_screens.py (native + 4x upscale).
ore_logo_preview.png    Output of preview_logo.py.

Full setup guide (from scratch)

A step-by-step, zero-experience walkthrough. It assumes you understand what Solana and ORE are, but assumes no prior experience with Arduino, ESP32, soldering, or flashing microcontrollers. By the end you'll have a small screen showing your live ORE mining stats, with no PC required to keep it running. (Done embedded work before? The condensed version is in Build & flash above.)

1. What you need

Hardware

  • A LilyGo T-Display-S3 board. This is the only board this firmware supports.
    • It's the same board sold as the NerdMiner V2 — if you have one of those, you're set.
    • It has an ESP32-S3 chip, a small 1.9" colour screen built in, and two buttons on the front edge.
    • Buy the version with the screen already soldered on (LilyGo sells "soldered" and "unsoldered/pin-header" variants). No soldering is required for this project.
  • A USB-C cable that carries data, not just power. Many cheap cables are charge-only and will not work — the computer won't see the board at all. If in doubt, use the cable that came with a phone for data transfer.
  • A computer running Windows, macOS, or Linux.
  • Your phone (for the one-time Wi-Fi setup later).

What you do not need

  • No breadboard, resistors, or wiring — the board is self-contained.
  • No soldering iron (assuming the soldered screen variant).
  • No external programmer/debugger — you flash straight over USB-C.

2. Install the Arduino IDE

The Arduino IDE is the free program you'll use to put ("flash") the firmware onto the board.

  1. Go to https://www.arduino.cc/en/software.
  2. Download Arduino IDE 2.x (the big version number, e.g. 2.3.x) for your operating system. Do not use the old "1.8.x" legacy version — this guide assumes 2.x.
  3. Install and open it. The first launch may ask to install USB drivers — say yes to any driver prompts (Windows especially).

You should land on a window with a code editor, a big checkmark (Verify) and arrow (Upload) button at the top left, and a sidebar.

3. Add ESP32 board support

Out of the box, the Arduino IDE only knows about Arduino-brand boards. The T-Display-S3 uses an ESP32-S3 chip, so we have to teach the IDE about it.

  1. Open File → Preferences (on macOS: Arduino IDE → Settings).

  2. Find the box labelled "Additional boards manager URLs".

  3. Paste this URL into it:

    https://espressif.github.io/arduino-esp32/package_esp32_index.json
    

    (If there's already something in the box, add this on a new line.)

  4. Click OK.

  5. Open the Boards Manager — it's the second icon down in the left sidebar (looks like a little chip), or Tools → Board → Boards Manager….

  6. In the search box type esp32.

  7. Find "esp32" by Espressif Systems and click Install. This downloads ~200 MB and can take several minutes.

    • This firmware was tested on core version 3.3.8. Any 3.x version should work. Do not use the old 2.x core.

When it finishes you'll have the LilyGo T-Display-S3 available as a board choice (we'll select it in step 6).

4. Install the required libraries

Libraries are reusable code packages. This firmware needs two that you install by hand; the rest ship with the ESP32 core you just installed and need no action.

  1. Open the Library Manager — top icon in the left sidebar (looks like books), or Tools → Manage Libraries….

  2. Install each of these (search the name, click Install):

    Library Author Version What it does
    TFT_eSPI Bodmer ≥ 2.5.x Drives the colour screen.
    ArduinoJson Benoit Blanchon ≥ 7.x Parses the API responses.
    • If TFT_eSPI offers to also install dependencies, accept.
    • Make sure ArduinoJson is version 7 or newer — version 6 won't compile this code.
  3. The following are used by the firmware but come bundled with the ESP32 core — you do not install them separately: WiFi, HTTPClient, WiFiClientSecure, Preferences, WebServer, DNSServer, FS.

5. Configure the screen library (TFT_eSPI) — don't skip this

This is the one step beginners get wrong. The TFT_eSPI screen library has to be told which exact screen and pins your board uses. If you skip this, the code will upload but the screen will stay black or garbled.

This repo ships a ready-made config file — User_Setup.h — that already has the correct settings for the T-Display-S3. You just need to drop it into the library folder, replacing the default.

5a. Find your libraries folder

Arduino stores libraries in your sketchbook folder. To find it:

  • Arduino IDE → File → Preferences and look at "Sketchbook location" at the top.

Inside that folder you'll find a libraries subfolder, and inside that, a TFT_eSPI folder. Typical locations:

OS Path
Windows C:\Users\<you>\Documents\Arduino\libraries\TFT_eSPI\
macOS ~/Documents/Arduino/libraries/TFT_eSPI/
Linux ~/Arduino/libraries/TFT_eSPI/

5b. Replace User_Setup.h

  1. In that TFT_eSPI folder, find the existing file named User_Setup.h.
  2. Replace it with the User_Setup.h from this repo (copy this repo's file over the top, overwriting it).
    • Tip: rename the original to User_Setup.h.bak first if you want a backup.

That's it — this repo's User_Setup.h already contains the correct ST7789 driver, the 170×320 resolution, the 8-bit parallel pins, and the backlight pin for this board.

Alternative (advanced): instead of overwriting, you can leave User_Setup.h alone and edit User_Setup_Select.h in the library to #include this repo's file by path. The overwrite method above is simpler and recommended for a first build.

6. Open the firmware and pick board settings

  1. Download/clone this whole repo to your computer if you haven't already.

  2. Open esp32-ore-display.ino in the Arduino IDE (File → Open…, select the .ino).

    • The .ino, config.h, and User_Setup.h should all sit in the same folder — they do in this repo, so just keep the folder intact. (The User_Setup.h next to the .ino is just a reference copy; the one that actually matters is the one you placed in the library folder in step 5.)
  3. Now set the board options under the Tools menu. Match these exactly:

    Tools menu item Set to
    Board → ESP32 Arduino LilyGo T-Display-S3
    Partition Scheme 16M Flash (3MB APP / 9MB FATFS)
    USB Mode Hardware CDC and JTAG
    USB CDC On Boot Enabled
    Erase All Flash Before Sketch Upload Disabled
    • USB CDC On Boot = Enabled matters — without it the board may not appear as a serial port after flashing.
    • Erase All Flash = Disabled matters — leaving it disabled means your saved Wi-Fi and wallet survive future re-uploads (see Re-uploading firmware).

7. Plug in the board and select the port

  1. Connect the T-Display-S3 to your computer with the data USB-C cable.
  2. In the IDE, open Tools → Port and select the new port that appeared:
    • Windows: something like COM5.
    • macOS: something like /dev/cu.usbmodem….
    • Linux: something like /dev/ttyACM0.
  3. No port showing up? Work through these in order:
    • Try a different USB cable (charge-only cables are the #1 cause).
    • Try a different USB port, ideally one directly on the computer, not a hub.
    • Force the board into download mode by hand: hold the BOOT button (the one wired to GPIO0), tap/release RESET, then release BOOT. Now check the Port list again. After flashing, press RESET once to run the new firmware.
    • On Windows, if the device shows as "unknown", let Windows Update install the driver, or install the CH9102/ESP32-S3 USB driver from LilyGo's docs.

8. Flash it

  1. Click the Verify button (the checkmark, top-left) first. This compiles the code without uploading. The first compile is slow (a minute or more) — that's normal.
    • If it errors here, it's almost always a missing/wrong library — re-check step 4 (especially ArduinoJson v7) and step 5.
  2. Click Upload (the right-arrow). The IDE compiles again, then transfers the firmware over USB. Watch the bottom status bar for progress and a "Done uploading" message.
  3. The board reboots automatically into the firmware.

If upload fails right at the "Connecting…" stage, repeat the manual BOOT/RESET trick from step 7, then hit Upload again.

9. First boot — connect it to Wi-Fi

Fresh firmware has no Wi-Fi credentials and no wallet baked in (by design — nothing personal lives in the source code). The board sets up its own temporary Wi-Fi network so you can hand it those details from your phone. This is called a captive portal.

  1. On the board's screen you'll see SETUP MODE, a network name like ORE-Display-AB12, and an IP address (192.168.4.1).
  2. On your phone, open Wi-Fi settings and connect to that ORE-Display-… network. It's open (no password).
  3. Most phones automatically pop a "Sign in to network" notification — tap it. (If nothing pops up, open a browser and go to http://192.168.4.1 manually.)
  4. A small web form appears. Fill in:
    • Your home Wi-Fi network name (SSID) and password.
    • One or more Solana wallet addresses (or managed-miner authorities) whose ORE stats you want to track — one per line, up to 20. Stats and portfolio are summed across them.
  5. Tap Save & Connect.

The board saves all of this to its internal flash (NVS), restarts, joins your home Wi-Fi, and starts pulling live stats. You won't have to do this again — on every future boot it connects straight away.

10. Using it day to day

Two buttons on the front control everything. The screen cycles through six pages (stats, portfolio, price, motherlode pool, your last motherlode win, your last top-miner win).

Gesture What it does
Top button quick click (< 1 s) Next page
Top button hold 1–3 s Rotate the display 180° (remembered after reboot)
Top button hold ≥ 3 s Turn the backlight on/off
Bottom button click Previous page
Both buttons held 5 s Reset to setup — clears wallets but keeps Wi-Fi (pre-filled when setup reopens). Wipe Wi-Fi via the Clear saved Wi-Fi button on the setup page.
Any press while backlight is off Wakes the screen (that press does nothing else)

A hint overlay appears mid-hold so you can see which action is about to fire, and releasing early cancels it. The factory-reset hold shows a 5-second countdown — let go before it finishes to abort.

Troubleshooting cheat-sheet

Symptom Likely cause / fix
Board never appears as a COM/serial port Charge-only USB cable, or need the manual BOOT+RESET download-mode trick (step 7).
Uploads fine but screen is black or garbled You skipped step 5 — the repo's User_Setup.h isn't in the TFT_eSPI library folder.
Compile fails mentioning ArduinoJson / JsonDocument Wrong ArduinoJson version — must be 7.x or newer (step 4).
Compile fails on TFT_eSPI.h not found TFT_eSPI library not installed (step 4).
Board appears but "Done uploading" never comes Hold BOOT, tap RESET, release BOOT to force download mode, then Upload again (step 7).
Screen shows SETUP MODE again unexpectedly A factory reset happened (both buttons held 5 s), or you uploaded with Erase All Flash enabled. Re-do step 9.
Stats look wrong / empty Double-check the wallet address you entered in the portal. Re-enter setup via a factory reset (both buttons, 5 s).

Acknowledgements

License

MIT © 2026 SpuddyA7X

About

ORE mining stats display for the LilyGo T-Display-S3 (NerdMiner V2 hardware)

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages