📖 What Pearson does

Chapter 5 is where the project stops being a breadboard and becomes an instrument. Pearson covers:

  • Lab equipment. What you need on your bench: soldering iron, solder, wire strippers, flush cutters, multimeter, helping hands, safety glasses.
  • Soldering safety. Don’t breathe the fumes. Don’t burn yourself. Don’t solder a live circuit.
  • The photo theremin. (Transferred from Ch 3, finished into a permanent instrument with a knob and an enclosure.)

🎓 Background: our equivalent of “the enclosure”

In our firmware, the “enclosure” is the printed-circuit board + the 3D-printed case + the TFT screen + the 4×4 button matrix. These are the parts of the device the user sees and touches. The soldering-iron equivalent for our project is flashing the firmware — connecting the ESP32 over USB and pushing the compiled binary to it.

Just as Pearson argues that the enclosure is what makes a breadboard feel like an instrument, our project argues that the TFT screen and the button matrix are what makes our firmware feel like a PO-33. Both are true. A blob of code on a microcontroller that you can only talk to over a serial port is a development kit, not an instrument. The moment you put it in a case with a screen and buttons, it becomes an instrument.

The TFT on our device is a 2.4-inch, 240×320-pixel colour display driven by an ILI9341 chip over SPI. It has 8 named “screens”. Only the first two exist in the current firmware; the rest are the v2 UI proposal (docs/DESIGN.md §6). They are listed so you can see the design intent:

  1. Main / step grid — the default screen, showing the 16 steps of the active pattern with the current step highlighted. (implemented)
  2. Sound-select — shows 16 slots, indicating which have audio. (implemented as the sketch picker’s slot view)
  3. Pattern-select — shows 16 patterns, indicating which have steps. (v2 proposal)
  4. Tweak — shows the current tweak mode (TONE / FILTER / TRIM). (the tweak label is shown in the main-screen status bar)
  5. Sketch picker — long-press WRITE to enter this; lists all saved sketches. (implemented)
  6. FX picker — (not implemented in v1: FX + step N selects an effect directly, and FX long-press toggles sync IN)
  7. Clock + alarm — shows the wall-clock time and the alarm time. (v2 proposal)
  8. Battery / status — a corner overlay always present.

These are the closest thing we have to Pearson’s knobs and switches. Each is a small UI element that maps to a single global setting.

🔧 Try it on the device

Exercise 1: look at the boot screen.

After reset, the firmware draws the main screen. You’ll see:

  • A status strip with P01, the current BPM, and a clock.
  • A 4×4 grid of step buttons, most of them empty (white).
  • The word TONE or FILTER or TRIM near the top — the current tweak mode.
  • A small “BAT 87%” overlay somewhere.

All of these are knobs Pearson would have used a potentiometer to express. In our firmware they are pixels drawn by main/ui/display.c.

Exercise 2: cycle through the tweak modes.

If you have a device, tap FX. The mode label changes: TONE → FILTER → TRIM → TONE. This is the same as Pearson’s “three knobs on the front panel” — one knob per mode.

Over UART:

> tweak_mode

prints the current mode.

Exercise 3: see the slot screen.

If you have a device, press SOUND. The screen shows the 16 slots; recorded slots have an orange dot; empty slots are dark.

Over UART:

> slot_info

prints the same data as text.

🛠 Code reference

  • The TFT driver — main/ui/display.c and main/ui/ili9341.c. About 2 000 lines of C. The display is drawn 30 times per second via a FreeRTOS task.
  • The button matrix — main/ui/buttons.c. A 4×4 button matrix scanned by an I/O expander (likely MCP23017 or PCA9555) over I²C.
  • The 8 screens — main/ui/display.c, function render_screen(). Dispatches to one of 8 render functions based on the current display_state_t.

🚫 What we can’t simulate

  • The soldering experience. Our project doesn’t require you to solder anything (unless you build the hardware from scratch, in which case you solder the DAC, the TFT, the I/O expander, the buttons, and the microphone). For users with a pre-built device, this whole chapter is moot.
  • The enclosure. Our device ships with a 3D-printed case (or no case, depending on the kit). The “feel” of the device is set by the case design, not the firmware.