Skip to content

Learn by Doing: Interactive TUI Tutorials

The StackCalc32 firmware, Apple Watch app, and iOS app include 16 built-in interactive lessons powered by the native Text User Interface (TUI).

The TUI replaces standard nested modal dialogues with an expandable, chatbot-style scrolling terminal rendered in the bundled Terminus pixel font. Lessons describe physical and digital calculator operations, providing real-time verification against the deterministic RPNCore engine.


1. Terminal Navigation & Controls

Learn how to navigate the expandable TUI scrolling transcript buffer and switch between the standard 1-line LCD and the full-screen terminal.

> TUI: CONTROLS (LESSON 1/16) [C] EXIT

> Terminal navigation tutorial.

> Use ↰ + 8 to scroll up and ↰ + 7 to scroll down.

> Step 1: Press Left Shift (↰)

> Step 2: Press 8 [SCROLL UP]

> Step 3: Press Left Shift (↰)

> Step 4: Press 7 [SCROLL DOWN]

> VERIFIED: Transcript buffer navigation unlocked.

0.0000_ [NEXT]
  • Tap ↰ (Left Shift) to engage the shift annunciator.
  • Tap 8 to scroll up into previous calculation history.
  • Tap 7 to scroll down back to the active prompt.
  • Tap C to dismiss the TUI overlay back to the primary stack view.

2. RPN Basics: Eliminating Parentheses

Reverse Polish Notation replaces the traditional = button and parenthesis keys with an automatic 4-level stack (\(X, Y, Z, T\)).

Mission: Calculate \(5 + 3\) without parentheses.

> TUI: RPN BASICS (LESSON 2/16) [C] EXIT

> Mission: Calculate 5 + 3 with no parentheses.

> In RPN, you enter arguments first, then specify the operator.

> Step 1: Tap 5

> Step 2: Tap ENTER [Lifts 5 into Stack Register Y]

> Step 3: Tap 3 [Enters 3 into Stack Register X]

> Step 4: Tap + [Combines Y and X into X]

> VERIFIED: X = 8.0000 [STACK LIFT ARMED]

8.0000_ [NEXT]
  1. Tap 5: Types 5_ left-justified on the LCD display.
  2. Tap ENTER: Commits 5 to the bottom of the stack and arms stack-lift.
  3. Tap 3: Types 3_ in the active \(X\) register while \(Y\) retains 5.
  4. Tap +: Instantly evaluates \(5 + 3 = 8.0000\).

3. Complex Numbers: Euler’s Identity

StackCalc handles full complex pairs \((a + bi)\) natively across all scientific and transcendental functions.

Mission: Verify Euler's identity: \(e^{\pi i} = -1\).

> TUI: COMPLEX PAIRS (LESSON 3/16) [C] EXIT

> Mission: Verify e^(πi) = −1 with complex pairs.

> Step 1: Tap 0 -> press ENTER [Real part in Y = 0]

> Step 2: Tap Right Shift -> Tap SIN (π) [Imaginary part in X = 3.1416]

> Step 3: Tap Left Shift -> Tap STO (CMPLX) [Arms complex operator]

> Step 4: Tap eˣ [Evaluates transcendental e^(0 + πi)]

> Step 5: Left Shift -> STO (CMPLX) -> Right Shift -> ENTER (SHOW)

> VERIFIED: Result = −1.0000 + 0.0000i

-1.0000_ [NEXT]

4. Fraction Entry & Manual Simplification ([SIMP])

Unlike consumer calculators that automatically simplify fractions and hide the underlying math from students, StackCalc preserves exact fraction state. Students must press [SIMP] to actively reduce fractions step-by-step.

Mission: Enter \(\frac{2}{4}\) and reduce it to \(\frac{1}{2}\).

> TUI: FRACTION SIMPLIFICATION (LESSON 5/16) [C] EXIT

> Mission: Enter 2/4 and reduce step-by-step.

> Format: [Whole] . [Numerator] . [Denominator]

> Step 1: Tap . -> Tap 2 -> Tap . -> Tap 4 [.2.4]

> Step 2: Tap ENTER [Displays: .2.4_ without reducing]

> Step 3: Tap Softkey [SIMP]

> VERIFIED: Common divisor 2 factored out -> .1.2 (.1/2)

.1.2_ [NEXT]

5. Mixed Fraction Arithmetic & Decimal Toggle ([FDISP])

Add mixed numbers exactly and toggle instantly between exact fractional form and floating-point decimal.

Mission: Add \(1 \frac{1}{2} + 1 \frac{3}{4} = 3 \frac{1}{4} = 3.2500\).

> TUI: MIXED FRACTION ARITHMETIC (LESSON 6/16) [C] EXIT

> Mission: Add 1 1/2 + 1 3/4 exactly.

> Step 1: Tap 1 . 1 . 2 -> Press ENTER [1 1/2 in Y]

> Step 2: Tap 1 . 3 . 4 [1 3/4 in X]

> Step 3: Tap + [Exact sum evaluated: 3 1/4]

> Step 4: Tap [FDISP] to toggle to decimal representation.

> VERIFIED: 3.2500 [PRESS FDISP AGAIN TO RETURN TO 3_1/4]

3.2500_ [NEXT]

6. Time Value of Money (TVM Amortization)

The built-in financial solver handles loan payments, mortgages, savings plans, and balloon notes without requiring complex algebraic formulas.

Mission: Calculate the monthly payment on a $200,000 30-year fixed loan at 5.5% annual interest.

\[\text{Monthly Payment} = \frac{PV \cdot i}{1 - (1 + i)^{-N}}\]
> TUI: TVM AMORTIZATION (LESSON 8/16) [C] EXIT

> Loan parameters: N=360 months, I/YR=5.5%, PV=$200,000

> Step 1: 360 -> [N] (Number of periods)

> Step 2: 5.5 -> [I/YR] (Annual interest rate)

> Step 3: 200000 -> [PV] (Present loan value)

> Step 4: 0 -> [FV] (Future loan balance)

> Step 5: Press [PMT] to execute solver.

> VERIFIED: PMT = $1,126.83 / month

1,126.83_ [NEXT]

7. Statistical Sums & Standard Deviation

Accumulate 2-variable data pairs \((x, y)\) into continuous memory registers using \(\Sigma+\) to calculate means and sample standard deviations.

Mission: Enter sample data points \((2, 4)\) and \((4, 6)\), then solve mean and standard deviation.

> TUI: STATISTICS & STD DEV (LESSON 14/16) [C] EXIT

> Step 1: Tap Left Shift (↰) -> CLEAR -> Σ (Clears stat registers)

> Step 2: 4 [Y] -> ENTER -> 2 [X] -> Tap Σ+ [Accumulates n=1]

> Step 3: 6 [Y] -> ENTER -> 4 [X] -> Tap Σ+ [Accumulates n=2]

> Step 4: Tap Right Shift -> yˣ (x̄, ȳ) -> Mean X = 3.0000, Mean Y = 5.0000

> Step 5: Tap Right Shift -> ¹/x (s, σ) -> Sample StdDev = 1.4142

> VERIFIED: Standard deviation s = 1.4142

1.4142_ [EXIT]

8. Executing Tutorials on Physical Firmware (RP2350)

StackCalc32's 16 guided lessons are not limited to touchscreens—they are implemented natively in bare-metal Embedded Swift running on the physical RP2350 microcontroller. The hardware provides an authentic, distraction-free environment to master RPN calculation.

Hardware Launch Sequence

  • Dedicated Launcher Key: Press Left Shift (↰) + C anywhere on the physical keypad to launch the built-in Interactive Tutorial Runner.
  • Instant Event Interception: The firmware event loop intercepts matrix scanning, suspends the standard operational stack, and loads the active tutorial state machine directly into the display buffer.

Physical Display & Dynamic Softkeys

  • ST7567A Transflective LCD: The 132×65 pixel monochrome display renders a 4-line terminal transcript using the sharp 6×8 pixel Terminus font. High contrast ensures clear legibility under harsh laboratory lighting or direct sunlight.
  • Tactile Softkey Integration: The top row of 6 tactile keys dynamically maps to contextual controls:
  • Key 1 ([PREV]): Revisit the previous instruction step.
  • Key 2 ([NEXT]): Advance to the next step once target preconditions are verified.
  • Key 5 ([SKIP]): Jump ahead to the subsequent lesson in the curriculum.
  • Key 6 ([EXIT]): Dismiss the tutorial session and immediately restore your active calculation stack.

Real-Time Keystroke & Stack Verification

  • When an instructional step prompts for an input sequence (for example, Press 5 -> ENTER -> 3 -> +), the firmware monitors physical switch actuations across the 43-key matrix.
  • Each switch closure evaluates against the deterministic RPNCore math engine.
  • Upon matching expected results, the LCD displays VERIFIED: [TEST PASSED] and enables the [NEXT] softkey to advance.

Non-Volatile Flash Memory Persistence

  • Progress across the 16 lessons is tracked via an internal bitmask stored in the RP2350's non-volatile QSPI flash memory (firmwareTutorialCompletionMask).
  • Your tutorial progress and mastery state persist across deep sleep, power cycles, and battery changes.

The Complete 16-Lesson Curriculum

Every lesson is available with complete bit-for-bit parity across the physical hardware instrument, iPad, and Apple Watch:

# Lesson Title Target Capabilities Covered
01 RPN Basics Stack lift mechanics, eliminating parentheses, 4-level register manipulation (\(X, Y, Z, T\))
02 Complex Numbers Cartesian \((a + bi)\) entry, complex transcendentals, Euler's identity (\(e^{\pi i} = -1\))
03 Angular Modes Degree, Radian, and Gradian conversions and trigonometric evaluations
04 Register Storage Direct and indirect register addressing with STO and RCL
05 Fraction Entry Three-part .Whole.Numerator.Denominator fractional format
06 Manual Simplification Factoring common divisors step-by-step using the [SIMP] softkey
07 Mixed Arithmetic Exact fractional addition, subtraction, multiplication, and division
08 Fraction/Decimal Toggle Toggling instantly between exact rational fractions and floating-point decimal via [FDISP]
09 TVM Amortization Solving loan amortization parameters (\(N, I\%YR, PV, PMT, FV\)) without algebraic formulas
10 Unit Conversions Metric and Imperial length, mass, volume, and temperature conversions
11 Integer Division Integer quotient and remainder arithmetic using modern ÷R notation
12 Last X Recovery Error correction and argument reuse via LAST𝑥
13 Time Conversions Decimal hours to Hours:Minutes:Seconds (▸HR, ▸HMS)
14 Base Modes Hexadecimal, Decimal, Octal, and Binary bitwise logic and word sizes
15 Two-Variable Statistics Accumulating coordinate data pairs with \(\Sigma+\) and \(\Sigma-\)
16 Standard Deviation Sample (\(s\)) and population (\(\sigma\)) standard deviations, weighted means

Experience StackCalc Across Surfaces

Master the tutorials on dedicated tactile hardware, or practice on your iPhone and Apple Watch: