# tmwho/schreikabine_leddriver architecture

> Architecture diagram of the GitHub repository tmwho/schreikabine_leddriver, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/tmwho/schreikabine_leddriver
- Repository: https://github.com/tmwho/schreikabine_leddriver

## Overview

This is Arduino firmware for an audio level meter. Its runtime samples an analog audio signal, computes RMS, converts and calibrates the level to dB SPL, smooths it, then sends the result over serial and displays it on a peak-hold LED strip. The sampled source shows these stages in one file; there are no separate domain modules or persistent stores.

Main entry points: [`src/main.cpp`](https://github.com/tmwho/schreikabine_leddriver/blob/main/src/main.cpp) (Runtime loop)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_measurement["Level measurement"]
  node_loop["Runtime loop<br/>[main.cpp]"]
  node_rms["RMS sampling<br/>[main.cpp]"]
  node_calibration["dB calibration<br/>[main.cpp]"]
end

subgraph group_outputs["Meter outputs"]
  node_serial(("Serial display"))
  node_leds(("LED strip"))
end

node_audio(("Audio signal"))

node_audio -->|"provides signal"| node_rms
node_loop -->|"samples"| node_rms
node_loop -->|"calibrates and smooths"| node_calibration
node_loop -->|"sends dB packet"| node_serial
node_loop -->|"renders peak meter"| node_leds

click node_loop "https://github.com/tmwho/schreikabine_leddriver/blob/main/src/main.cpp"
click node_rms "https://github.com/tmwho/schreikabine_leddriver/blob/main/src/main.cpp"
click node_calibration "https://github.com/tmwho/schreikabine_leddriver/blob/main/src/main.cpp"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_loop,node_rms,node_calibration toneBlue
class node_serial,node_leds toneAmber
class node_audio toneIndigo
```

## Components

### Level measurement

- [Runtime loop](https://github.com/tmwho/schreikabine_leddriver/blob/main/src/main.cpp): `src/main.cpp`
- [RMS sampling](https://github.com/tmwho/schreikabine_leddriver/blob/main/src/main.cpp): `src/main.cpp`
- [dB calibration](https://github.com/tmwho/schreikabine_leddriver/blob/main/src/main.cpp): `src/main.cpp`

### Meter outputs

- **Serial display**
- **LED strip**

### Other components

- **Audio signal**

## Connections

- Audio signal → RMS sampling: provides signal
- Runtime loop → RMS sampling: samples
- Runtime loop → dB calibration: calibrates and smooths
- Runtime loop → Serial display: sends dB packet
- Runtime loop → LED strip: renders peak meter
