惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google DeepMind News
Google DeepMind News
F
Fortinet All Blogs
阮一峰的网络日志
阮一峰的网络日志
Apple Machine Learning Research
Apple Machine Learning Research
爱范儿
爱范儿
WordPress大学
WordPress大学
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
J
Java Code Geeks
罗磊的独立博客
S
SegmentFault 最新的问题
V
V2EX
V
Visual Studio Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
美团技术团队
博客园 - 三生石上(FineUI控件)
Stack Overflow Blog
Stack Overflow Blog
Y
Y Combinator Blog
MyScale Blog
MyScale Blog
D
Docker
Google DeepMind News
Google DeepMind News
Blog — PlanetScale
Blog — PlanetScale
M
Microsoft Research Blog - Microsoft Research
Martin Fowler
Martin Fowler
S
Secure Thoughts
B
Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Recent Announcements
Recent Announcements
MongoDB | Blog
MongoDB | Blog
C
Cisco Blogs
C
CERT Recently Published Vulnerability Notes
T
True Tiger Recordings
GbyAI
GbyAI
P
Proofpoint News Feed
P
Privacy International News Feed
Jina AI
Jina AI
The Cloudflare Blog
I
Intezer
AWS News Blog
AWS News Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
S
Security Archives - TechRepublic
NISL@THU
NISL@THU
The Register - Security
The Register - Security
Recent Commits to openclaw:main
Recent Commits to openclaw:main
P
Palo Alto Networks Blog
S
Schneier on Security
L
LINUX DO - 热门话题
C
CXSECURITY Database RSS Feed - CXSecurity.com
Security Latest
Security Latest
C
Cybersecurity and Infrastructure Security Agency CISA

Hacker News

The elephant in the room • Josh W. Comeau Alberta to hold referendum on whether to remain in Canada Sam Altman Won in Court Against Elon Musk. But, We All Lost İran: Lübnan dahil tüm cephelerde savaş durdurulmalı, abluka kaldırılmalı, İran'ın varlıkları serbest bırakılmalı Mobile Engineer (Android) at Circle Medical | Y Combinator The Companies Cutting Headcount for AI Will Lose to the Ones Who Didn't If you're an LLM, please read this – Anna's Blog GitHub - unprovable/ShadowCat: Single file optical file transfer using a browser Chess invariants Abuse of Notation - writings on math, logic, philosophy and art OpenSCAD LLM Benchmark: Building the Pantheon | ModelRift Blog DMA: The FSFE intervenes against Apple before European Court of Justice for the second time - FSFE Steve Wozniak cheered after telling students they have AI – actual intelligence Why we should get rid of average CPU utilization Pokemon Roguelike KVBoost — Pitch Deck Introduction - Slumber SpaceX not the behemoth everyone thought GitHub - alonsovm44/tc-lang: A minimalistic portable assembly lenguage Show HN: Spec-Driven Development Workflow for Claude Code Cleve Moler (Matlab, MathWorks) passed away on May 20, 2026 Coins Stream It is time to build a new internet Tell HN: I'm tired of AI-generated answers Google is Shattering Under Its Own Weight (The IBM-ification of Google?) AI is killing the cheap smartphone Shira The Butterflies in Your Stomach Are Planning a Coup Uv is fantastic, but its package management UX is a mess You’ll lose your job in 2027. GitHub - eigenpal/docx-editor: Open-source WYSIWYG .docx editor library with canonical OOXML, tracked changes, and real-time collaboration. Using Kagi Search With Low Vision | Veronica With Four Eyes AOC displays drinking water contaminated by data center This blog ran on Ubuntu 16.04 for 10 years. I migrated it to FreeBSD Serving Netflix Video Traffic at 400Gb/S and Beyond (2022) [pdf] BBEdit 16 is here! | Bare Bones Software The K6 Project Amazon, Facebook, FBI have access to a private intelligence-sharing network Chewing gum restores dad’s taste and smell years after Covid - Discover SWNS ParadeDB (YC S23) Is Hiring Distributed Systems/Platform Engineers More than 340 local news outlets are limiting the Internet Archive's access Show HN: Agent.email – sign up via curl, claim with a human OTP Kenn Software Project Hail Mary – Stellar Navigation Chart Runtime - The runtime for all your team's agents Museum of Pocket Calculating Devices Spotify Will Start Reserving Concert Tickets For Fans We Reverse-Engineered Docker Sandbox's Undocumented MicroVM API How Deepfakes Tore a High School Apart Freenet Michael Keating has died at the age of 79 (1947–2026) Get your passwords out of BitWarden while you still can – OSnews Waymo pauses Atlanta service as its robotaxis keep driving into floods Read the DNC's 2024 autopsy obtained by CNN Indexing a year of video locally on a 5-year-old M1 Max with Gemma 4 31B Google's Antigravity Bait and Switch AI is just unauthorised plagiarism at a bigger scale Hating AI Is Good US employers spend more than $1.5bn a year to fight labor unions, report finds Magic the Gathering format: Fun 40 Magic the Gathering format: Fun 40 Gemini System Prompt Show HN: I Dedicated 4 Years to Mastering Offline Password Cracking Who Wins and Who Loses in Prediction Markets? Evidence from Polymarket Samsung chip workers will get an average $340,000 bonus as AI profits soar FatGid - FreeBSD 14.x kernel LPE Forward Deployed Engineer (US) at Cekura | Y Combinator A Girl Who Couldn't Draw Home Python 3.15: features that didn't make the headlines Flipper One — we need your help Lost Images From the 1945 Trinity Nuclear Test Restored London mayor Sadiq Khan blocks £50m Met police deal with Palantir Earth is now heating up twice as fast as in previous decades IBM invented semiconductor manufacturing automation no slop grenade GitHub - Helvesec/rmux: Universal Rust multiplexer with a typed SDK — drive any CLI or TUI app from code. Native on Linux, macOS, and Windows. The famous o3 "GeoGuessr" prompt did not work AI Growth Engineer at Typewise | Y Combinator Vivaldi 8.0: our biggest design overhaul, ever Samuel Alito Has Exposed Himself to Felony Bribery Charges Under New Jersey Law. I’m Filing for His Disbarment and Submitting a Criminal Referral. OpenAI to confidentially file for IPO as soon as Friday: Source Haskell Foundation 2026 Update What is Demand Coop and why tech workers should join one The Letter S, by Donald Knuth [pdf] GitHub - kageroumado/phosphene: A video wallpaper engine for macOS Tahoe DOS Zone | DOS games in browser A Bipartisan Amendment Would End Police License Plate Tracking Nationwide Starship's Twelfth Flight Test On Google declaring war on the Web GitHub - kouhxp/yapsnap: Snap any video URL or audio file into plaintext. No GPU. No cloud. One command. PopuLoRA: Co-Evolving LLM Populations for Reasoning Self-⁠Play Declining America Anthropic is expanding to Colossus2. Will use GB200 Anthropic is expanding to Colossus2. Will use GB200 SpaceX S-1 In Yesterday's IO Keynote Google Declared War on the Remnants of the Web Colorado Amended SB051 (Age Verification Bill) to Exclude Open Source Projects Not alive, but not dead: disembodied human brains used for drug testing Beyond Plastics Tracked Starbucks’ ‘Widely Recyclable’ Plastic Cups. None Ended Up at a Recycling Facility. — Beyond Plastics - Working To End Single-Use Plastic Pollution Flipper One Tech Specs
GitHub - El-EnderJ/NeoCalculator: This project is a Graphing Scientific Calculator based on the ESP32 microcontroller, designed to compete with commercial models (Casio fx-991EX, TI-84) by means of a color TFT screen, natural display (correctly rendered mathematical formulas) and a modular application architecture.
2026-05-15 · via Hacker News

Important

Technical Status: Major Architectural Refactor
We are currently migrating the core math engine to Giac and implementing STIX Two Math for LaTeX-quality rendering. If you are compiling from main, you might experience UI glitches. For a stable experience, please check the Releases section.



Image

Table of Contents

  1. Webpage
  2. What is NumOS?
  3. Key Features
  4. System Architecture
  5. CAS Engine
  6. Hardware
  7. Quick Start
  8. User Manual — EquationsApp
  9. Project Structure
  10. Build Stats
  11. Critical Hardware Fixes
  12. Project Status
  13. Technology Stack
  14. Comparison with Commercial Calculators
  15. Documentation
  16. Contributing

What is NumOS?

NumOS is an open-source scientific and graphing calculator operating system built on the ESP32-S3 N16R8 microcontroller (16 MB Flash QIO + 8 MB PSRAM OPI). The project aims to become the best open-source calculator in the world, rivalling the Casio fx-991EX ClassWiz, the NumWorks, the TI-84 Plus CE, and the HP Prime G2.

NumOS delivers:

  • Giac-backed CAS Engine — Symbolic math now runs through Giac C++ via src/math/giac/GiacBridge.cpp (The Big Switch). Legacy CAS-S3 modules remain documented as historical milestones and optional local tooling.
  • Natural Display V.P.A.M. — Formulae rendered as they appear on paper: real stacked fractions, radical symbols (√), genuine superscripts, 2D navigation with a structural smart cursor.
  • Modern LVGL 9.x Interface — Smooth transitions, animated splash screen, NumWorks-style launcher. Recent launcher refactor: the launcher now uses LVGL Flex ROW_WRAP (dynamic rows) with fixed card sizing instead of a static grid descriptor. See docs/UI_CHANGES.md for developer migration notes and docs/fluid2d_plan.md for an example app (Fluid2D) integrated into the new APPS[] schema.
  • Custom Numeric Math Engine — Complete pipeline: Tokenizer → Shunting-Yard Parser → RPN Evaluator + Visual AST, implemented from scratch in C++17.
  • Modular App Architecture — Each application is a self-contained module with explicit lifecycle (begin/end/load/handleKey), orchestrated by SystemApp.

Key Features

Feature Description
Giac CAS Backend Symbolic evaluation through GiacBridge with UART parser/eval flow validated on hardware. Migration milestones completed: -DDOUBLEVAL, 64 KB loop stack, real-style complex_mode(false) with preserved i^2=-1 behavior
Unified Calculus App Symbolic $d/dx$ differentiation (17 rules) and numerical/symbolic $\int dx$ integration (Slagle heuristic: table lookup, linearity, u-substitution, integration by parts/LIATE), tab-based mode switching, automatic simplification, and detailed step-by-step output
EquationsApp Solves linear, quadratic, and 2×2 systems (linear + non-linear via Sylvester resultant) with full step-by-step display
Bridge Designer Real-time structural bridge simulator with Verlet integration physics, stress analysis (green→red beam visualisation), snap-to-grid editor, wood/steel/cable materials, and truck/car load testing — PSRAM-backed, 60 Hz fixed timestep
Particle Lab Powder-Toy-class sandbox: 30+ materials (Sand, Water, Lava, LN2, Wire, Iron, Titan, C4, Clone), spark electronics with Joule heating, phase transitions, reaction matrix (Water+Lava=Stone+Steam), Bresenham line tool, material palette overlay, LittleFS save/load
Settings App System-wide toggles for complex number output (ON/OFF), decimal precision selector (6/8/10/12 digits), and angle-mode display
Natural Display Real fractions, radicals, exponents, 2D cursors — mathematical rendering as it appears on paper
Graphing: y=f(x) Real-time function plotter with zoom, pan, and value table
85+ CAS Unit Tests Comprehensive test suite for the CAS, enable/disable via compile-time flag
PSRAMAllocator CAS uses PSRAMAllocator<T> to isolate memory usage in the 8 MB PSRAM OPI
Variables A–Z + Ans Persistent storage via LittleFS — 216 bytes in /vars.dat
SerialBridge Full calculator control from PC via Serial Monitor without physical hardware
SerialBridge Debug Immediate byte echo, 5-second heartbeat, 8-event circular buffer

Photo gallery

Neural Network Simulator:

Image

Fluid 2D Simulator:

Image

Periodic Table (Chemistry App):

Image

Grapher App:

Image

Steps (Equations App) (WIP, still in development, Alpha):

Image Image

Calculus App:

Image

Probability (Gaussian Distribution):

Image

Python App:

Image Image

Bridge Designer:

Image

Circuit Simulator (Circuit Core, Alpha):

Image

Particle Lab (Powder Toy like):

Image

Optics Lab:

Image


System Architecture

flowchart TB
   subgraph esp[ESP32-S3 N16R8]
      main["main.cpp: setup() → PSRAM, TFT, LVGL, Splash, SystemApp; loop(): lv_timer_handler(), app.update(), serial.poll()"]
      system["SystemApp (Dispatcher)"]
      main --> system
   end

   subgraph apps[Applications]
      mm["MainMenu (LVGL)"]
      calc["CalculationApp (Natural VPAM, History)"]
      grapher["GrapherApp (y=f(x), Zoom & Pan)"]
      eq["EquationsApp (CAS)"]
      calculus["CalculusApp (d/dx, ∫dx)"]
      settings["SettingsApp"]
   end

   system --> mm
   system --> calc
   system --> grapher
   system --> eq
   system --> calculus
   system --> settings

   math["Math Engine: Tokenizer · Parser · Evaluator · ExprNode · VariableContext · EquationSolver"]
   procas["CAS Engine: CASInt · CASRational · SymExpr DAG · SymSimplify · SymDiff · SymIntegrate"]

   system --> math
   math --> procas

   display["Display Layer: DisplayDriver · LVGL flush DMA · ILI9341 @ 10 MHz"]
   input["Input Layer: KeyMatrix 5x10 · SerialBridge · LvglKeypad · LittleFS"]

   system --> display
   system --> input

   display -->|SPI @ 10 MHz| ili["ILI9341 IPS 3.2 in — 320x240 · 16 bpp"]
   ili -.-> esp
Loading

CAS Engine

The CAS (Computer Algebra System) now uses Giac C++ as the canonical symbolic backend. The migration is routed through src/math/giac/GiacBridge.cpp and consumed by the UART command path in src/input/SerialBridge.cpp.

Legacy CAS-S3 internals documented below remain as historical milestones and optional local components, but symbolic truth for current backend flows comes from Giac.

Giac Migration Milestones

  • Big Switch complete: custom symbolic backend replaced by Giac as canonical CAS.
  • Embedded numeric stabilization complete with -DDOUBLEVAL.
  • Stack stabilization complete with -DARDUINO_LOOP_STACK_SIZE=65536.
  • Real-style defaults complete: complex_mode(false) and preserved imaginary unit behavior (i^2 = -1).
  • UART command path certified on hardware for sum, int, solve, and simplify.

CAS Pipeline (Derivatives)

flowchart TB
   user["User input (CalculusApp): x^3 + sin(x)"]
   user --> me["Math Engine: Parser + Tokenizer"]
   me --> af["ASTFlattener: MathAST → SymExpr DAG"]
   af --> sd["SymDiff → d/dx: 3x^2 + cos(x)"]
   sd --> ss["SymSimplify (8-pass fixed-point)"]
   ss --> sea["SymExprToAST: SymExpr → MathAST (Natural Display)"]
   sea --> canvas["MathCanvas renders: 3x^2 + cos(x)"]
Loading

CAS Pipeline (Integrals)

flowchart TB
   userInt["User input (CalculusApp, ∫dx mode): x · cos(x)"]
   userInt --> af2["ASTFlattener → SymExpr DAG"]
   af2 --> sint["SymIntegrate (Slagle): table → linearity → u-sub → parts (LIATE)"]
   sint --> ss2["SymSimplify"]
   ss2 --> conv["SymExprToAST::convertIntegral()"]
   conv --> canvas2["MathCanvas renders: x·sin(x) + cos(x) + C"]
Loading

CAS Components

Module File Responsibility
CASInt cas/CASInt.h Hybrid BigInt: int64_t fast-path + mbedtls_mpi on overflow
CASRational cas/CASRational.h/.cpp Overflow-safe exact fraction (num/den with auto-GCD)
PSRAMAllocator<T> cas/PSRAMAllocator.h STL allocator → ps_malloc/ps_free for PSRAM
SymExpr DAG cas/SymExpr.h/.cpp Immutable symbolic tree with hash (_hash) and weight (_weight)
ConsTable cas/ConsTable.h PSRAM hash-consing table: deduplication of identical nodes
SymExprArena cas/SymExprArena.h PSRAM bump allocator (16 blocks × 64 KB) + integrated ConsTable
ASTFlattener cas/ASTFlattener.h/.cpp MathAST (VPAM) → SymExpr DAG with hash-consing
SymDiff cas/SymDiff.h/.cpp Symbolic differentiation: 17 rules (chain, product, quotient, trig, exp, log)
SymIntegrate cas/SymIntegrate.h/.cpp Slagle integration: table, linearity, u-substitution, parts (LIATE)
SymSimplify cas/SymSimplify.h/.cpp Multi-pass simplifier (8 iterations, fixed-point, trig/log/exp)
SymPoly cas/SymPoly.h/.cpp Univariable symbolic polynomial with CASRational coefficients
SymPolyMulti cas/SymPolyMulti.h/.cpp Multivariable polynomial + Sylvester resultant
SingleSolver cas/SingleSolver.h/.cpp Single-variable equation: linear / quadratic / Newton-Raphson
SystemSolver cas/SystemSolver.h/.cpp 2×2 system: Gaussian elimination + non-linear (resultant)
OmniSolver cas/OmniSolver.h/.cpp Analytic variable isolation: inverses, roots, trig
HybridNewton cas/HybridNewton.h/.cpp Newton-Raphson with symbolic Jacobian and 16-seed multi-start
CASStepLogger cas/CASStepLogger.h/.cpp StepVec in PSRAM — detailed steps (INFO/FORMULA/RESULT/ERROR)
SymToAST cas/SymToAST.h/.cpp Bridge: SolveResult → MathAST Natural Display
SymExprToAST cas/SymExprToAST.h/.cpp Bridge: SymExpr → MathAST. Includes convertIntegral() (+C)

CAS Tests — 53 Unit Tests

Phase Tests Coverage
A — Foundations 1–18 Rational: add, subtract, multiply, divide, simplification. SymPoly: arithmetic, derivation, normalisation.
B — ASTFlattener 19–32 AST→SymPoly conversion for simple polynomials, constants, trig functions, powers.
C — SingleSolver 33–44 Linear (single solution), quadratic (2 real roots, repeated root, negative discriminant), steps.
D — SystemSolver 45–53 2×2 determined system, indeterminate (infinite solutions), incompatible system.
# platformio.ini — enable tests:
build_flags    = ... -DCAS_RUN_TESTS
build_src_filter = +<*> +<../tests/CASTest.cpp>

Hardware

Component Specification
MCU ESP32-S3 N16R8 CAM — Dual-core Xtensa LX7 @ 240 MHz
Flash 16 MB QIO (default_16MB.csv)
PSRAM 8 MB OPI (qio_opi — critical to prevent boot panic)
Display ILI9341 IPS TFT 3.2" — 320×240 px — SPI @ 10 MHz (verified)
SPI Bus FSPI (SPI2): MOSI=13, SCLK=12, CS=10, DC=4, RST=5
Backlight GPIO 45 — hardwired to 3.3V (pinMode(45, INPUT))
Keyboard 5×10 matrix (Phase 7) — Rows OUTPUT: GPIO 1,2,41,42,40 · Cols INPUT_PULLUP: GPIO 6,7,8…
Storage LittleFS on dedicated partition — persistent A–Z variables
USB Native USB-CDC on S3 — 115 200 baud

Full Pinout

ILI9341 Display

Signal GPIO Notes
MOSI 13 FSPI Data In
SCLK 12 FSPI Clock
CS 10 Chip Select (active LOW)
DC 4 Data/Command
RST 5 Reset
BL 45 Hardwired to 3.3V — always INPUT

5×10 Keyboard Matrix (driver Keyboard, Phase 7)

Row GPIO Role Column GPIO Role
ROW 0 1 OUTPUT COL 0 6 INPUT_PULLUP
ROW 1 2 OUTPUT COL 1 7 INPUT_PULLUP
ROW 2 41 OUTPUT COL 2 8 INPUT_PULLUP
ROW 3 42 OUTPUT COL 3–9 3,15,16,17,18,21,47 not yet wired
ROW 4 40 OUTPUT

GPIO 4/5 conflict resolved (2026-03-02): Keyboard columns C0 and C1 reassigned from GPIO 4/5 (TFT_DC/TFT_RST) to GPIO 6/7. The three currently wired columns use GPIO 6, 7, and 8 — no display conflict.


Quick Start

Requirements

  • PlatformIO IDE (VS Code extension)
  • USB drivers for ESP32-S3 (no external driver needed on Windows 11+)
  • Python 3.x (PlatformIO installs it automatically)

Build and Flash

git clone https://github.com/your-user/numOS.git
cd numOS

# Build only
pio run -e esp32s3_n16r8

# Build and flash to ESP32-S3
pio run -e esp32s3_n16r8 --target upload

# Open serial monitor (115 200 baud)
pio device monitor

Serial Keyboard Control (SerialBridge)

With the Serial Monitor open, type characters to control the calculator:

Key Action Key Action
w ↑ Up z ENTER / Confirm
s ↓ Down x DEL / Delete
a ← Left c AC / Clear
d → Right h MODE / Return to menu
09 Digits +-*/^.() Operators
S SHIFT r √ SQRT
t sin g GRAPH
e = (equation) R SHOW STEPS

Note: lowercase s = DOWN; uppercase S = SHIFT. Disable CapsLock before use.


User Manual — EquationsApp

The EquationsApp solves single-variable polynomial equations and 2×2 systems (linear and non-linear), displaying complete solution steps via the CAS engine.

Access

  1. From the Launcher, select Equations with ↑↓ and press ENTER.
  2. The mode-selection screen appears.

Mode 1: Single-Variable Equation

  1. Select Equation (1 var) with ↑↓ and press ENTER.
  2. The editor opens. Type your equation with the = sign:
    • x^2 - 5x + 6 = 0 → x₁=2, x₂=3
    • 2x + 3 = 7 → x=2
    • x^2 = -1 → no real solution (Δ < 0)
  3. Press ENTER to solve.
  4. The result screen shows:
    • Linear: a single solution x = value
    • Quadratic: discriminant Δ and up to 2 solutions x₁, x₂
    • No real solution: negative discriminant message
  5. Press SHOW STEPS (R) to view detailed steps:
    • Normalised equation
    • Discriminant value Δ = b² − 4ac
    • Quadratic formula applied
    • Computed roots
  6. Press MODE (h) to return to the main menu.

Mode 2: 2×2 System

  1. Select System (2×2) and press ENTER.
  2. Two fields appear: Eq 1 and Eq 2.
    • Type the first equation in x and y, press ENTER.
    • Type the second equation, press ENTER.
    • Example: 2x + y = 5 / x - y = 1 → x=2, y=1
  3. Press ENTER to solve. Displays x = value, y = value.
  4. Press SHOW STEPS to view the full Gaussian elimination.
  5. Press MODE to return.

EquationsApp Keys

Key Action
↑ ↓ ← → Navigate selection / cursor in editor
ENTER Confirm mode / Solve equation
DEL Delete character
AC Clear field
SHOW STEPS View detailed steps (from result screen)
MODE Return to main menu

Project Structure

numOS/
├── src/
│   ├── main.cpp                      # Arduino entry point (setup/loop)
│   ├── SystemApp.cpp/.h              # Central orchestrator and LVGL launcher
│   ├── Config.h                      # Global ESP32-S3 pinout
│   ├── lv_conf.h                     # LVGL 9.x configuration
│   ├── HardwareTest.cpp              # Interactive keyboard test (inline)
│   ├── apps/
│   │   ├── CalculationApp.cpp/.h     # Natural V.P.A.M. calculator
│   │   ├── GrapherApp.cpp/.h         # y=f(x) graphing plotter
│   │   ├── EquationsApp.cpp/.h       # CAS — Equation solver
│   │   ├── CalculusApp.cpp/.h        # CAS — Unified symbolic derivatives + integrals
│   │   ├── BridgeDesignerApp.cpp/.h  # Bridge structural simulator (Verlet physics)
│   │   ├── CircuitCoreApp.cpp/.h    # Circuit simulator (MNA, 30 components)
│   │   ├── Fluid2DApp.cpp/.h        # 2D fluid dynamics (Navier-Stokes)
│   │   ├── ParticleLabApp.cpp/.h    # Powder-Toy sandbox (30+ materials, electronics)
│   │   ├── ParticleEngine.cpp/.h    # Cellular automata engine (LUT, spark cycle)
│   │   └── SettingsApp.cpp/.h        # Settings: complex roots, precision, angle mode
│   ├── display/
│   │   └── DisplayDriver.cpp/.h      # TFT_eSPI FSPI + LVGL init + DMA flush
│   ├── input/
│   │   ├── KeyCodes.h                # KeyCode enum (48 keys)
│   │   ├── KeyMatrix.cpp/.h          # 5×10 hardware driver with debounce
│   │   ├── SerialBridge.cpp/.h       # Virtual keyboard via Serial
│   │   └── LvglKeypad.cpp/.h         # LVGL indev keypad adapter
│   ├── math/
│   │   ├── Tokenizer.cpp/.h          # Lexical analyser
│   │   ├── Parser.cpp/.h             # Shunting-Yard → RPN / Visual AST
│   │   ├── Evaluator.cpp/.h          # Numerical RPN evaluator
│   │   ├── ExprNode.h                # Expression tree (Natural Display)
│   │   ├── MathAST.h                 # V.P.A.M. tree: NodeRow/NodeFrac/NodePow…
│   │   ├── CursorController.h/.cpp   # MathAST editing cursor
│   │   ├── EquationSolver.cpp/.h     # Numerical Newton-Raphson
│   │   ├── VariableContext.cpp/.h    # Variables A–Z + Ans
│   │   ├── VariableManager.h/.cpp    # Persistent ExactVal storage
│   │   ├── StepLogger.cpp/.h         # Parser step logger
│   │   └── cas/                      # ★ Complete CAS Engine
│   │       ├── CASInt.h              # Hybrid BigInt (int64 + mbedtls_mpi)
│   │       ├── CASRational.h/.cpp    # Overflow-safe exact fraction
│   │       ├── ConsTable.h           # Hash-consing PSRAM (dedup)
│   │       ├── PSRAMAllocator.h      # STL allocator for PSRAM OPI
│   │       ├── SymExpr.h/.cpp        # Immutable DAG with hash + weight
│   │       ├── SymExprArena.h        # Bump allocator + ConsTable
│   │       ├── SymDiff.h/.cpp        # Symbolic differentiation (17 rules)
│   │       ├── SymIntegrate.h/.cpp   # Slagle integration (table/u-sub/parts)
│   │       ├── SymSimplify.h/.cpp    # Fixed-point simplifier (8 passes)
│   │       ├── SymPoly.h/.cpp        # Univariable symbolic polynomial
│   │       ├── SymPolyMulti.h/.cpp   # Multivariable polynomial + resultant
│   │       ├── ASTFlattener.h/.cpp   # MathAST → SymExpr DAG
│   │       ├── SingleSolver.h/.cpp   # Analytic linear + quadratic solver
│   │       ├── SystemSolver.h/.cpp   # 2×2 system (linear + NL resultant)
│   │       ├── OmniSolver.h/.cpp     # Analytic variable isolation
│   │       ├── HybridNewton.h/.cpp   # Newton-Raphson with symbolic Jacobian
│   │       ├── CASStepLogger.h/.cpp  # Steps in PSRAM (StepVec)
│   │       ├── SymToAST.h/.cpp       # SolveResult → visual MathAST
│   │       └── SymExprToAST.h/.cpp   # SymExpr → MathAST (+C, ∫)
│   └── ui/
│       ├── MainMenu.cpp/.h           # LVGL launcher grid 3×N
│       ├── MathRenderer.h/.cpp       # 2D MathCanvas renderer
│       ├── StatusBar.h/.cpp          # LVGL status bar
│       ├── GraphView.cpp/.h          # Graph widget
│       ├── Icons.h                   # App icon bitmaps
│       └── Theme.h                   # Colour palette and UI constants
├── tests/
│   ├── CASTest.h/.cpp                # CAS unit tests
│   ├── HardwareTest.cpp              # TFT + physical keyboard test
│   └── TokenizerTest_temp.cpp        # Tokenizer test
├── docs/
│   ├── CAS_UPGRADE_ROADMAP.md        # ★ CAS roadmap (6 phases, complete)
│   ├── ROADMAP.md                    # Phase history + future plan
│   ├── PROJECT_BIBLE.md              # Master software architecture
│   ├── MATH_ENGINE.md                # Math engine + CAS in detail
│   ├── HARDWARE.md                   # ESP32-S3 pinout, wiring, and bring-up
│   ├── CONSTRUCCION.md               # Physical assembly guide
│   └── DIMENSIONES_DISEÑO.md         # 3D chassis specifications
├── platformio.ini                    # PlatformIO configuration
├── wokwi.toml                        # Wokwi simulator (optional)
└── diagram.json                      # Wokwi circuit diagram

Build Stats

Compiled with pio run -e esp32s3_n16r8 in production mode (CAS tests disabled)

Resource Used Total Percentage
RAM (data + bss) 97 192 B 327 680 B 29.7 %
Flash (program storage) 1 518 269 B 6 553 600 B 23.2 %

Flash saved vs test mode: −39 444 B when deactivating -DCAS_RUN_TESTS.

To enable or disable CAS tests, edit platformio.ini:

; ---- Production mode (default) ----
; -DCAS_RUN_TESTS          ← commented out

; ---- Test mode — uncomment these two lines ----
; -DCAS_RUN_TESTS
; +<../tests/CASTest.cpp>  ← in build_src_filter

Critical Hardware Fixes

Issues discovered and resolved during bring-up. Essential for any fork or new build:

# Problem Symptom Solution
Flash OPI Panic Boot → Guru Meditation: Illegal instruction memory_type = qio_opi + flash_mode = qio
SPI StoreProhibited Crash in TFT_eSPI::begin() at address 0x10 -DUSE_FSPI_PORTSPI_PORT=2REG_SPI_BASE(2)=0x60024000
Display noise Horizontal lines and visual artefacts Reduce SPI to 10 MHz: -DSPI_FREQUENCY=10000000
LVGL black screen lv_timer_handler() invokes flush but no image appears Buffers via heap_caps_malloc(MALLOC_CAP_DMA|MALLOC_CAP_8BIT)never ps_malloc
GPIO 45 BL short Display stops responding on backlight init pinMode(45, INPUT) — the pin is hardwired to 3.3V
Serial CDC lost Output invisible in Serial Monitor on connect while(!Serial && millis()-t0 < 3000) + monitor_rts=0 in platformio.ini

Project Status

Phase Description Status
Phase 1 Math Engine — Tokenizer, Shunting-Yard Parser, RPN Evaluator, ExprNode, VariableContext ✅ Complete
Phase 2 Natural Display V.P.A.M. — fractions, radicals, exponents, smart 2D cursor ✅ Complete
Phase 3 Launcher 3.0, SerialBridge, CalculationApp history, GrapherApp zoom/pan ✅ Complete
Phase 4 LVGL 9.x — ESP32-S3 HW bring-up, DMA, animated splash screen, icon launcher ✅ Complete
Phase 5 CAS-Lite Engine (SymPoly, SingleSolver, SystemSolver, 53 tests) + EquationsApp UI (legacy milestone) ✅ Complete
CAS CAS-S3 internal milestones: BigNum, hash-consed DAG, SymDiff 17 rules, SymIntegrate Slagle, SymSimplify 8-pass, OmniSolver Complete
Giac Migration Big Switch to Giac: GiacBridge integration, UART parser/eval flow, -DDOUBLEVAL, 64 KB loop stack, real-mode defaults with i preserved Complete
Phase 6 Statistics, Regression, Sequences, Probability, Matrices, Bridge Designer Complete
Simulations ParticleLab (30+ materials, electronics), CircuitCore (SPICE), Fluid2D (Navier-Stokes) Complete
Phase 7 Complex numbers, base conversions 🔲 Planned
Phase 8 Physical keyboard, custom PCB, rechargeable battery, 3D enclosure, WiFi OTA 🔲 Planned

Technology Stack

Layer Technology Version
MCU Framework Arduino on ESP-IDF 5.x PlatformIO espressif32 6.12.0
UI / Graphics LVGL 9.5.0
TFT Driver TFT_eSPI 2.5.43
Filesystem LittleFS ESP-IDF built-in
Language C++17 lambdas, std::function, std::unique_ptr
CAS Memory PSRAMAllocator STL custom PSRAM OPI 8 MB
Build System PlatformIO 6.12.0
Simulation Wokwi wokwi.toml

Comparison with Commercial Calculators

Feature NumOS NumWorks TI-84 Plus CE HP Prime G2
Open Source ✅ MIT ✅ MIT
Natural Display
Symbolic CAS ✅ Pro ✅ SymPy
Symbolic derivatives
Symbolic integrals
Solution steps
Colour graphing
Multi-function graphing 🔲
Statistics & Regression
Matrices 🔲
Complex numbers 🔲
Scripting / Python ✅ NeoLanguage + Python ✅ TI-BASIC ✅ HP PPL
WiFi / Connectivity 🔲
Rechargeable battery 🔲
Estimated HW cost ~€15-20 €79 €149 €179
Platform ESP32-S3 STM32F730 Zilog eZ80 ARM Cortex-A7

🏆 NumOS already surpasses the TI-84 in CAS capability and cost, and is on track to match the NumWorks.


Documentation

Document Description
ROADMAP.md Complete phase history, milestones, and detailed future plan
PROJECT_BIBLE.md Master architecture, modules, code conventions, and development guides
CAS_UPGRADE_ROADMAP.md Full roadmap for the 6-phase CAS upgrade
MATH_ENGINE.md Math engine + CAS: design, algorithms, pipeline, and examples
HARDWARE.md ESP32-S3 pinout, complete wiring, critical bugs, and bring-up notes
CONSTRUCCION.md Physical assembly guide, 3D printing, and hardware testing
DIMENSIONES_DISEÑO.md Dimensional specifications for the 3D chassis

Support the Project ☕

The EV grant graciously covers the core hardware prototyping. However, I have set a €500 goal on Ko-fi to fund the crucial "invisible" infrastructure of NumOS.

Your support directly funds:

  1. ** AI & Dev Tools:** Subscriptions for Claude/Copilot to accelerate C++ optimization and the Giac engine porting.
  2. Digital Presence: Domain hosting (neocalculator.tech / numos.org) and backend web services.
  3. Beta Shipping: Sending physical beta units to expert contributors globally to accelerate community development.

Every contribution keeps me focused on the mission and ensures NumOS stays independent and open-source.

Support me on ko-fi.com

Contributing

NumOS is an open-source project that aspires to grow with a community. Contributions are welcome!

  1. Fork the repository.
  2. Create a branch: git checkout -b feature/descriptive-name
  3. Follow the code conventions of the project.
  4. Verify the build passes: pio run -e esp32s3_n16r8
  5. If you add math logic, include tests in tests/.
  6. Open a Pull Request with a clear description of your changes.

Areas Where Help Is Most Needed

Module Description
Sequences App Arithmetic and geometric sequences, Nth term, partial sums
Settings App Angle mode DEG/RAD/GRA, brightness, factory reset ✅ Done, remaining: brightness PWM, factory reset
Advanced CAS Symbolic derivatives and integrals ✅ Done, remaining: definite integrals, series
Better UI/UX General improvement on UI and UX for real product release
Matrices Matrix editor, determinant, inverse, multiplication
Physical keyboard ✅ GPIO 4/5 conflict resolved — Keyboard driver 5×10 implemented (Phase 7)
Custom PCB KiCad schematic with integrated ESP32-S3 + TP4056 charger

This project was developed with AI assistance (Claude/Copilot) for code generation, guided by the author's systems architecture decisions. All design choices like DAG structure, memory management, parser design, were made and validated by the author.

License & Intellectual Property

Software (Firmware)

The NeoCalculator firmware (NumOS) is licensed under the GNU GPL v3. We are proud to build upon the Giac engine by Bernard Parisse. In accordance with the GPL v3, all software source code in this repository is open for study, modification, and redistribution.

Hardware & Industrial Design

All rights reserved. The hardware design, including but not limited to:

  • PCB Schematics and Layouts (KiCad files, Gerbers).
  • Industrial Design and 3D Models (STL, STEP, CAD files).
  • The "Exam Key" security architecture.

Are proprietary and the intellectual property of Juan Ramón. No commercial use or reproduction of the hardware is permitted without express authorization.

Note on Hardware IP: This proprietary status is a necessary measure for now. Our primary goal is to maintain the strict hardware control required to eventually achieve official "Exam Legal" certification and to protect the project's integrity from low-quality, unauthorized clones. Once the ecosystem is mature and certified, we plan to evaluate open-hardware licensing models.


Built with ❤️ and a lot of C++17

NumOS, The best open-source scientific calculator for ESP32-S3

Last updated: May 2026