# ralphxavier/si4735 architecture

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

- Interactive diagram: https://gitdiagram.com/ralphxavier/si4735
- Repository: https://github.com/ralphxavier/si4735

## Overview

This repository contains Arduino Si4732/Si4735 radio implementations for TTGO T-Display and Lilygo T-Display S3 boards, including rotary-encoder variants and an FM-radio port. The README identifies the board projects and the PU2CLR Si4735 library; the sampled source establishes how the rotary decoder reads pins and emits direction events. Sketches and their broader feature flows were not sampled, so their internal relationships are left unasserted.

Main entry points: [`TTGO_T-Display/Si473x_Rotary_Encoder_Interface/Si473x_Rotary_Encoder_Interface_V3.ino`](https://github.com/ralphxavier/si4735/blob/master/TTGO_T-Display/Si473x_Rotary_Encoder_Interface/Si473x_Rotary_Encoder_Interface_V3.ino) (TTGO interface V3), [`TTGO_T-Display/Si473x_Rotary_Encoder_Interface_V4.1/Si473x_Rotary_Encoder_Interface_V4.1.ino`](https://github.com/ralphxavier/si4735/blob/master/TTGO_T-Display/Si473x_Rotary_Encoder_Interface_V4.1/Si473x_Rotary_Encoder_Interface_V4.1.ino) (TTGO interface V4.1), [`Lilygo_T-Display_S3/ALL_IN_ONE_T-Display_S3/ALL_IN_ONE_T-Display_S3.ino`](https://github.com/ralphxavier/si4735/blob/master/Lilygo_T-Display_S3/ALL_IN_ONE_T-Display_S3/ALL_IN_ONE_T-Display_S3.ino) (S3 all-in-one), [`Lilygo_T-Display_S3/Volos_TEmbedFMRadio_Port/Volos_TEmbedFMRadio_Port.ino`](https://github.com/ralphxavier/si4735/blob/master/Lilygo_T-Display_S3/Volos_TEmbedFMRadio_Port/Volos_TEmbedFMRadio_Port.ino) (S3 FM port)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_projects["Radio Projects"]
  node_ttgo_v3["TTGO interface V3"]
  node_ttgo_v41["TTGO interface V4.1"]
  node_s3_allinone["S3 all-in-one"]
  node_s3_fm["S3 FM port"]
end

subgraph group_input["Rotary Input"]
  node_ttgo_rotary["TTGO rotary decoder<br/>[Rotary.cpp]"]
  node_ttgo_rotary_api["TTGO rotary API<br/>[Rotary.h]"]
  node_v41_rotary["V4.1 rotary decoder<br/>[Rotary.cpp]"]
  node_v41_rotary_api["V4.1 rotary API<br/>[Rotary.h]"]
  node_s3_rotary["S3 rotary decoder<br/>[Rotary.cpp]"]
  node_s3_rotary_api["S3 rotary API<br/>[Rotary.h]"]
end

subgraph group_firmware["Radio Firmware Data"]
  node_ttgo_init_patch["TTGO init patch<br/>[patch_init.h]"]
  node_ttgo_full_patch["TTGO full patch<br/>[patch_full.h]"]
  node_v41_init_patch["V4.1 init patch<br/>[patch_init.h]"]
  node_v41_full_patch["V4.1 full patch<br/>[patch_full.h]"]
  node_s3_init_patch["S3 init patch<br/>[patch_init.h]"]
end

node_operator(("Radio operator"))
node_radio_library["PU2CLR library"]

node_operator -->|"uses"| node_ttgo_v3
node_operator -->|"uses"| node_ttgo_v41
node_operator -->|"uses"| node_s3_allinone
node_operator -->|"uses"| node_s3_fm
node_ttgo_v3 -->|"uses"| node_radio_library
node_ttgo_v41 -->|"uses"| node_radio_library
node_s3_allinone -->|"uses"| node_radio_library
node_s3_fm -->|"uses"| node_radio_library
node_ttgo_rotary -->|"includes"| node_ttgo_rotary_api
node_v41_rotary -->|"includes"| node_v41_rotary_api
node_s3_rotary -->|"includes"| node_s3_rotary_api

click node_ttgo_v3 "https://github.com/ralphxavier/si4735/blob/master/TTGO_T-Display/Si473x_Rotary_Encoder_Interface/Si473x_Rotary_Encoder_Interface_V3.ino"
click node_ttgo_v41 "https://github.com/ralphxavier/si4735/blob/master/TTGO_T-Display/Si473x_Rotary_Encoder_Interface_V4.1/Si473x_Rotary_Encoder_Interface_V4.1.ino"
click node_s3_allinone "https://github.com/ralphxavier/si4735/blob/master/Lilygo_T-Display_S3/ALL_IN_ONE_T-Display_S3/ALL_IN_ONE_T-Display_S3.ino"
click node_s3_fm "https://github.com/ralphxavier/si4735/blob/master/Lilygo_T-Display_S3/Volos_TEmbedFMRadio_Port/Volos_TEmbedFMRadio_Port.ino"
click node_ttgo_rotary "https://github.com/ralphxavier/si4735/blob/master/TTGO_T-Display/Si473x_Rotary_Encoder_Interface/Rotary.cpp"
click node_ttgo_rotary_api "https://github.com/ralphxavier/si4735/blob/master/TTGO_T-Display/Si473x_Rotary_Encoder_Interface/Rotary.h"
click node_v41_rotary "https://github.com/ralphxavier/si4735/blob/master/TTGO_T-Display/Si473x_Rotary_Encoder_Interface_V4.1/Rotary.cpp"
click node_v41_rotary_api "https://github.com/ralphxavier/si4735/blob/master/TTGO_T-Display/Si473x_Rotary_Encoder_Interface_V4.1/Rotary.h"
click node_s3_rotary "https://github.com/ralphxavier/si4735/blob/master/Lilygo_T-Display_S3/ALL_IN_ONE_T-Display_S3/Rotary.cpp"
click node_s3_rotary_api "https://github.com/ralphxavier/si4735/blob/master/Lilygo_T-Display_S3/ALL_IN_ONE_T-Display_S3/Rotary.h"
click node_ttgo_init_patch "https://github.com/ralphxavier/si4735/blob/master/TTGO_T-Display/Si473x_Rotary_Encoder_Interface/patch_init.h"
click node_ttgo_full_patch "https://github.com/ralphxavier/si4735/blob/master/TTGO_T-Display/Si473x_Rotary_Encoder_Interface/patch_full.h"
click node_v41_init_patch "https://github.com/ralphxavier/si4735/blob/master/TTGO_T-Display/Si473x_Rotary_Encoder_Interface_V4.1/patch_init.h"
click node_v41_full_patch "https://github.com/ralphxavier/si4735/blob/master/TTGO_T-Display/Si473x_Rotary_Encoder_Interface_V4.1/patch_full.h"
click node_s3_init_patch "https://github.com/ralphxavier/si4735/blob/master/Lilygo_T-Display_S3/ALL_IN_ONE_T-Display_S3/patch_init.h"

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_ttgo_v3,node_ttgo_v41,node_s3_allinone,node_s3_fm toneBlue
class node_ttgo_rotary,node_ttgo_rotary_api,node_v41_rotary,node_v41_rotary_api,node_s3_rotary,node_s3_rotary_api toneAmber
class node_ttgo_init_patch,node_ttgo_full_patch,node_v41_init_patch,node_v41_full_patch,node_s3_init_patch toneMint
class node_operator,node_radio_library toneIndigo
```

## Components

### Radio Projects

- [TTGO interface V3](https://github.com/ralphxavier/si4735/blob/master/TTGO_T-Display/Si473x_Rotary_Encoder_Interface/Si473x_Rotary_Encoder_Interface_V3.ino): `TTGO_T-Display/Si473x_Rotary_Encoder_Interface/Si473x_Rotary_Encoder_Interface_V3.ino`
- [TTGO interface V4.1](https://github.com/ralphxavier/si4735/blob/master/TTGO_T-Display/Si473x_Rotary_Encoder_Interface_V4.1/Si473x_Rotary_Encoder_Interface_V4.1.ino): `TTGO_T-Display/Si473x_Rotary_Encoder_Interface_V4.1/Si473x_Rotary_Encoder_Interface_V4.1.ino`
- [S3 all-in-one](https://github.com/ralphxavier/si4735/blob/master/Lilygo_T-Display_S3/ALL_IN_ONE_T-Display_S3/ALL_IN_ONE_T-Display_S3.ino): `Lilygo_T-Display_S3/ALL_IN_ONE_T-Display_S3/ALL_IN_ONE_T-Display_S3.ino`
- [S3 FM port](https://github.com/ralphxavier/si4735/blob/master/Lilygo_T-Display_S3/Volos_TEmbedFMRadio_Port/Volos_TEmbedFMRadio_Port.ino): `Lilygo_T-Display_S3/Volos_TEmbedFMRadio_Port/Volos_TEmbedFMRadio_Port.ino`

### Rotary Input

- [TTGO rotary decoder](https://github.com/ralphxavier/si4735/blob/master/TTGO_T-Display/Si473x_Rotary_Encoder_Interface/Rotary.cpp): `TTGO_T-Display/Si473x_Rotary_Encoder_Interface/Rotary.cpp`
- [TTGO rotary API](https://github.com/ralphxavier/si4735/blob/master/TTGO_T-Display/Si473x_Rotary_Encoder_Interface/Rotary.h): `TTGO_T-Display/Si473x_Rotary_Encoder_Interface/Rotary.h`
- [V4.1 rotary decoder](https://github.com/ralphxavier/si4735/blob/master/TTGO_T-Display/Si473x_Rotary_Encoder_Interface_V4.1/Rotary.cpp): `TTGO_T-Display/Si473x_Rotary_Encoder_Interface_V4.1/Rotary.cpp`
- [V4.1 rotary API](https://github.com/ralphxavier/si4735/blob/master/TTGO_T-Display/Si473x_Rotary_Encoder_Interface_V4.1/Rotary.h): `TTGO_T-Display/Si473x_Rotary_Encoder_Interface_V4.1/Rotary.h`
- [S3 rotary decoder](https://github.com/ralphxavier/si4735/blob/master/Lilygo_T-Display_S3/ALL_IN_ONE_T-Display_S3/Rotary.cpp): `Lilygo_T-Display_S3/ALL_IN_ONE_T-Display_S3/Rotary.cpp`
- [S3 rotary API](https://github.com/ralphxavier/si4735/blob/master/Lilygo_T-Display_S3/ALL_IN_ONE_T-Display_S3/Rotary.h): `Lilygo_T-Display_S3/ALL_IN_ONE_T-Display_S3/Rotary.h`

### Radio Firmware Data

- [TTGO init patch](https://github.com/ralphxavier/si4735/blob/master/TTGO_T-Display/Si473x_Rotary_Encoder_Interface/patch_init.h): `TTGO_T-Display/Si473x_Rotary_Encoder_Interface/patch_init.h`
- [TTGO full patch](https://github.com/ralphxavier/si4735/blob/master/TTGO_T-Display/Si473x_Rotary_Encoder_Interface/patch_full.h): `TTGO_T-Display/Si473x_Rotary_Encoder_Interface/patch_full.h`
- [V4.1 init patch](https://github.com/ralphxavier/si4735/blob/master/TTGO_T-Display/Si473x_Rotary_Encoder_Interface_V4.1/patch_init.h): `TTGO_T-Display/Si473x_Rotary_Encoder_Interface_V4.1/patch_init.h`
- [V4.1 full patch](https://github.com/ralphxavier/si4735/blob/master/TTGO_T-Display/Si473x_Rotary_Encoder_Interface_V4.1/patch_full.h): `TTGO_T-Display/Si473x_Rotary_Encoder_Interface_V4.1/patch_full.h`
- [S3 init patch](https://github.com/ralphxavier/si4735/blob/master/Lilygo_T-Display_S3/ALL_IN_ONE_T-Display_S3/patch_init.h): `Lilygo_T-Display_S3/ALL_IN_ONE_T-Display_S3/patch_init.h`

### Other components

- **Radio operator**
- **PU2CLR library**

## Connections

- Radio operator → TTGO interface V3: uses (evidence: `README.md`)
- Radio operator → TTGO interface V4.1: uses (evidence: `README.md`)
- Radio operator → S3 all-in-one: uses (evidence: `README.md`)
- Radio operator → S3 FM port: uses (evidence: `README.md`)
- TTGO interface V3 → PU2CLR library: uses (evidence: `README.md`)
- TTGO interface V4.1 → PU2CLR library: uses (evidence: `README.md`)
- S3 all-in-one → PU2CLR library: uses (evidence: `README.md`)
- S3 FM port → PU2CLR library: uses (evidence: `README.md`)
- TTGO rotary decoder → TTGO rotary API: includes (evidence: `TTGO_T-Display/Si473x_Rotary_Encoder_Interface/Rotary.cpp`)
- V4.1 rotary decoder → V4.1 rotary API: includes (evidence: `TTGO_T-Display/Si473x_Rotary_Encoder_Interface_V4.1/Rotary.cpp`)
- S3 rotary decoder → S3 rotary API: includes (evidence: `Lilygo_T-Display_S3/ALL_IN_ONE_T-Display_S3/Rotary.cpp`)
