Crystal Focus logo
CRYSTALFOCUS.NET
Tangible font selection tutorial
COMMUNITY GUIDE
TANGIBLE FONT SELECTION / BLADE DETECTION FOR CRYSTAL FOCUS X

Tangible Font Selection for Crystal Focus X

A practical guide to resistor-based font selection, blade detection, slot mapping, specials.txt setup, and the current status of Blade ID detection.

What you will learn

  • How tangible font selection works
  • How slots are selected from resistor values
  • How to configure tangible= in specials.txt
  • How blade detection and font switching fit together

Crystal Focus X — Tangible Font Selection & Blade Detection Guide

This guide explains how the Tangible font selection system works on the Crystal Focus X, how it enables automatic font switching and blade detection via resistors, and the current state of Blade ID detection.


Table of Contents

  1. What Is Tangible?
  2. Hardware Setup
  3. How Voltage Maps to Slots
  4. Configuration — specials.txt
  5. Attribute Characters
  6. Font Switching vs. Blade Detection
  7. Practical Examples

1. What Is Tangible?

Tangible is a resistor-based font and blade detection system. By placing different resistors (or a resistor ladder) inside a blade connector, pommel piece, or chassis module, the CFX reads an analog voltage when the component is inserted. Based on that voltage, it automatically selects a sound font and determines whether the saber is allowed to ignite.

This enables:


2. Hardware Setup

The Tangible Pin

At boot, the pin is briefly set as OUTPUT LOW to discharge any residual voltage, then switched to analog input mode for reading.

How the Resistor Works

A resistor in the blade connector forms a voltage divider with the board's internal circuitry. Different resistor values produce different voltages on PIN_A1, which the firmware reads to determine which slot (0–15) is active.

Important: Ledstrip Power Dependency

Practical note: the blade or accessory can influence the tangible reading as soon as it is electrically connected. In practice, this means the saber needs the strip connection to be in its normal powered state before the tangible system can read the slot reliably.


Basic tangible wiring with 3.3V, a fixed 10k resistor, and an accessory resistor.
Basic tangible wiring with 3.3V, a fixed 10k resistor, and an accessory resistor.

3. How Voltage Maps to Slots

The tangible system reads the resistor value as a voltage and places it into one of 16 slots. Each slot represents one possible tangible position or accessory state.

The table below shows how the voltage range is split across the 16 slots, from the lowest reading to the highest.

SlotADC RangeApprox Voltage
00–2550V – 0.206V
1256–5110.206V – 0.412V
2512–7670.412V – 0.618V
3768–10230.618V – 0.824V
41024–12790.824V – 1.030V
51280–15351.030V – 1.236V
61536–17911.236V – 1.442V
71792–20471.442V – 1.648V
82048–23031.648V – 1.855V
92304–25591.855V – 2.061V
102560–28152.061V – 2.267V
112816–30712.267V – 2.473V
123072–33272.473V – 2.679V
133328–35832.679V – 2.885V
143584–38392.885V – 3.091V
153840–40953.091V – 3.3V

The slot index is clamped to 0–15.


4. Configuration — specials.txt

Tangible is configured in specials.txt on the SD card (root level, or inside a theme folder) using the tangible= key.

Format

tangible=VALUE0,VALUE1,VALUE2,VALUE3,VALUE4,VALUE5,VALUE6,VALUE7,VALUE8,VALUE9,VALUE10,VALUE11,VALUE12,VALUE13,VALUE14,VALUE15

16 comma-separated values, one per slot (0–15). Each value is either:

Enabling Tangible

Tangible is automatically enabled when specials.txt contains a tangible= line with at least one font number or one of the enabling attribute characters (X, x, Z, z, o, O, r, L). The neutral character - does NOT enable tangible by itself.

If specials.txt is missing or has no tangible= line, tangible is disabled and the saber can always ignite.


5. Attribute Characters

Each slot in the tangible= line can hold either a font number or a special action character. These action characters are especially useful for blade detection and accessory-based behavior.

CharMeaningWhat it does
-NeutralNothing happens in this slot. Useful for unused slots or for creating gaps between active positions.
xNo ignitionPrevents the saber from igniting. Good for a “blade missing” or “crystal missing” state.
XNo ignition + retract if removed while onPrevents ignition, and if the blade is removed while the saber is already on, it triggers a blade retraction.
zNo ignition + boot warningSame as x, but also gives a missing blade or missing crystal warning at boot.
ZNo ignition + retract + boot warningSame as X, but also gives a missing blade or missing crystal warning at boot.
oBlade present / start allowedIndicates that the blade is inserted and the saber is allowed to ignite normally.
OBlade present with protected insert notificationAlso indicates blade present, but only plays the blade insertion UI files if the saber was previously in another state. This helps avoid repeated insert sounds caused by voltage glitches during ramping or heavy battery load.
rBlade removed notification onlyIndicates blade removal with sound and BMP, but does not prevent the saber from being used.
LRecall latest selected fontReturns to the latest font you selected from the menu. This is useful when an accessory temporarily overrides the font and you want the saber to go back to your last manually selected font when that accessory is removed.

Simple way to think about it:

6. Font Switching vs. Blade Detection

Tangible serves a dual purpose — it's both a font selector and a blade detector. These two functions are unified through the slot system:

As a Font Selector

Assign different font numbers to different slots. Place corresponding resistors in different blade connectors or chassis modules. When a blade is inserted, the voltage changes, a new slot is detected, and the font switches automatically.

As a Blade Detector

Reserve one slot (typically slot 0, the lowest voltage) for a no-start attribute (X, x, Z, or z). When no blade is present, the pin reads a low voltage, mapping to the no-start slot — preventing ignition. When a blade with a resistor is inserted, the voltage rises to a font slot — enabling ignition and selecting the correct font.

Combined Example

tangible=X,0,1,2,3,4,5,X,X,X,X,X,X,X,X,X

7. Practical Examples

Example A: Basic Blade Detection Only

Goal: Prevent the saber from igniting when no blade is inserted, but don't switch fonts.

tangible=X,o,-,-,-,-,-,-,-,-,-,-,-,-,-,-

Place a resistor in the blade that maps to slot 1. No blade = slot 0 = can't start.

Example B: Four Blades, Four Fonts

Goal: Four different blades each with a unique sound font, plus blade detection.

tangible=X,0,1,2,3,-,-,-,-,-,-,-,-,-,-,-

Select four resistor values that place each blade clearly in one of slots 1–4.

Example C: Silent Blade Removal

Goal: Blade detection that doesn't make sounds when the blade is removed while the saber is off.

tangible=x,O,-,-,-,-,-,-,-,-,-,-,-,-,-,-

Example D: Full 15-Font Setup

Goal: Maximum font variety with one blade-out slot.

tangible=X,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14

This requires 15 different resistor values, each producing a voltage clearly within its target slot.

Example E: Restore Last Font

Goal: A "default" blade that always returns to whatever font was last used via the menu.

tangible=X,L,0,1,2,3,-,-,-,-,-,-,-,-,-,-

A "plain" blade with a slot-1 resistor always plays the last manually-selected font. Specialized blades with higher resistors force specific fonts.


Guide generated from Crystal Focus X firmware source code analysis (Saber.cpp tangible state machine, Textfile.cpp specials.txt parsing, Ledstrip.cpp blade ID, main.h constants, Routines.cpp ADC reading).