Custom firmware for a modded TI-84 Plus with an internal Seeed Studio XIAO ESP32S3 Sense and OV5640 camera.
The calculator talks to the ESP32 over the 2.5mm TI link port. The ESP32 handles WiFi, camera capture, and OpenAI requests. A small TI-BASIC program called TIAI runs on the calculator as the UI.
- Send typed prompts to a vision-capable OpenAI model from the calculator
- Reply to continue a conversation with context from previous messages
- Take a photo and have it solved automatically
- Scroll through long responses line by line
- Web config portal for WiFi, API key, camera quality, and debug AP settings
- Three camera quality profiles: Fast (VGA), Balanced (SXGA), Sharp (UXGA)
- Camera debug hotspot (TI84CAM) with live preview page on port 81
- Toggle the debug AP on or off from the config portal
- Settings stored in ESP32 flash (NVS) and persist across reboots
- One-command program install via
Send({1})with automatic retry - Auto-reconnect and DNS recovery for flaky WiFi
| Part | Details |
|---|---|
| Calculator | TI-84 Plus (non-CE) |
| Microcontroller | Seeed Studio XIAO ESP32S3 Sense |
| Camera | OV5640 |
| Connection | Internal wiring to calculator link port |
This is a custom internal hardware mod, not a general-purpose accessory.
| TI Link Pin | ESP32 Pin |
|---|---|
| Tip | D0 |
| Ring | D1 |
See include/config.h and include/camera_pins.h for the full pin definitions.
include/
config.h - link pins, prompts, model, camera settings
camera_pins.h - OV5640 pin mapping
program_data.h - generated tokenized TI-BASIC program
src/
main.cpp - TI link handling and command dispatch
camera.h - camera capture and preview helpers
wifi_manager.h - WiFi, config portal, debug AP, and camera debug server
openai_client.h - OpenAI Responses API client with retry and DNS recovery
web_ui.h - config portal HTML rendering
tools/
build_program.py - TI-BASIC source and tokenizer
capture_serial.ps1 - serial log capture (timed, auto-detects COM port)
start_capture_background.ps1 - start serial capture in a background process
stop_capture_background.ps1 - stop the background capture process
platformio.ini - PlatformIO environment
You need three things installed before you can build:
- Python 3 -- https://www.python.org/downloads/
- Git -- https://git-scm.com/downloads
- PlatformIO
- Option A: install the PlatformIO IDE VS Code extension
- Option B: install PlatformIO Core for command-line builds (
pipx install platformio)
After installing PlatformIO, open this project folder in VS Code or in your shell.
If you use the VS Code extension you do not need to install PlatformIO Core separately.
PlatformIO docs: VS Code extension | Core installation
Build the firmware:
platformio runFlash to the ESP32:
platformio run --target uploadList connected serial devices if PlatformIO does not auto-detect the board:
platformio device listFlash to a specific port if needed:
platformio run --target upload --upload-port /dev/ttyACM0Open the serial monitor:
platformio device monitor --baud 115200Or target a specific port:
platformio device monitor --port /dev/ttyACM0 --baud 115200On Linux, if upload or monitor fails with Permission denied, add your user to the dialout group and sign out/in before retrying:
sudo usermod -aG dialout "$USER"Once the ESP32 is flashed, set up the calculator:
-
On the TI-84 home screen, type
Send({1})and press ENTER.To find
Send(: press [2ND] > [CATALOG] > [LN] > scroll toSend(This installs
prgmTIAIon the calculator. -
Run
prgmTIAI. -
Go to SETTINGS > CONFIGURE. The calculator will display an AP name.
-
On your phone or computer, connect to the TI84AI network (password:
12345678). -
Open the config page that appears and enter:
- WiFi network name (SSID) and password
- OpenAI API key
- Camera quality profile (optional, defaults to Balanced)
- Whether to enable the TI84CAM debug hotspot (optional, on by default)
-
Save. The ESP32 will reboot with the new settings.
-
Back on the calculator, go to SETTINGS > CONNECT.
You're ready. Use SEND MESSAGE to type a prompt, REPLY to follow up, or TAKE PHOTO to snap and solve. Scroll through long responses with the up/down keys.
When finished, pop out a battery to completely kill power to the ESP32. A 1.5V or 1.2V battery works.
When enabled and connected to WiFi, the ESP32 also starts a secondary AP called TI84CAM (password: 12345678). Connect to it and visit http://192.168.8.1:81/ to see a live camera preview. The debug AP can be toggled on or off from the config portal.
If you edit the TI-BASIC source in tools/build_program.py:
python3 tools/build_program.py # regenerate the tokenized program
platformio run --target upload # flash the updated firmwareThen on the calculator, run Send({1}) again to install the new version of TIAI.
- Camera quality, model, and prompt behavior are configured in
include/config.h - The OpenAI client uses the Responses API (
/v1/responses) with conversation state viaprevious_response_id - Vision requests are built manually (not via ArduinoJson) to avoid duplicating large base64 strings in RAM
- Serial logs are not committed because they may contain local network details
- Built for the TI-84 Plus, not the TI-84 Plus CE
- Large image uploads can stress the ESP32 network stack
- The silent install path may log
No ACK after EOTeven on a successful install - Vision requests do not carry conversation history (each photo is standalone)