# codeshark-lucifer/helios architecture

> Architecture diagram of the GitHub repository codeshark-lucifer/helios, 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/codeshark-lucifer/helios
- Repository: https://github.com/codeshark-lucifer/helios

## Overview

Helios is ESP32-S3 firmware whose user-facing workflow is button-driven: the main loop reads controls, selects and starts an action, then updates or stops it while rendering status on an OLED. The documented menu includes a radio-interference routine; its implementation configures and transmits through two nRF24-compatible radios. The graph focuses on runtime modules and physical interfaces. The sampled sources show the main dispatch and radio calls; external hardware connections are represented only where the README or code supports them.

Main entry points: [`src/main.cpp`](https://github.com/codeshark-lucifer/helios/blob/main/src/main.cpp) (Menu and Lifecycle), [`include/utils/display.h`](https://github.com/codeshark-lucifer/helios/blob/main/include/utils/display.h) (OLED Display Setup), [`src/module/radio.cpp`](https://github.com/codeshark-lucifer/helios/blob/main/src/module/radio.cpp) (Radio Initialization and Checks), [`src/attcks/blejam.cpp`](https://github.com/codeshark-lucifer/helios/blob/main/src/attcks/blejam.cpp) (Radio Transmission Routine)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_control["Menu Control"]
  node_main["Menu and Lifecycle<br/>[main.cpp]"]
end

subgraph group_interface["User Interface"]
  node_buttons["Button Scanner<br/>[button.h]"]
  node_display["OLED Display Setup<br/>[display.h]"]
end

subgraph group_radio["Radio Operations"]
  node_radio_manager["Radio Initialization and Checks<br/>[radio.cpp]"]
  node_blejam["Radio Transmission Routine<br/>[blejam.cpp]"]
end

node_user(("User"))
node_button_matrix["Five-Button Matrix"]
node_oled["SSD1306 OLED"]
node_radio_hardware["Two nRF24 Radios"]
node_nearby_devices(("Nearby Wireless Devices"))

node_user -->|"presses"| node_button_matrix
node_button_matrix -->|"input signals"| node_buttons
node_main -->|"scans buttons"| node_buttons
node_main -->|"initializes and renders"| node_display
node_display -->|"initializes"| node_oled
node_main -->|"initializes and checks"| node_radio_manager
node_radio_manager -->|"initializes and tests"| node_radio_hardware
node_main -->|"dispatches actions"| node_blejam
node_blejam -->|"configures and transmits"| node_radio_hardware
node_radio_hardware -.->|"interference output"| node_nearby_devices

click node_main "https://github.com/codeshark-lucifer/helios/blob/main/src/main.cpp"
click node_buttons "https://github.com/codeshark-lucifer/helios/blob/main/include/utils/button.h"
click node_display "https://github.com/codeshark-lucifer/helios/blob/main/include/utils/display.h"
click node_radio_manager "https://github.com/codeshark-lucifer/helios/blob/main/src/module/radio.cpp"
click node_blejam "https://github.com/codeshark-lucifer/helios/blob/main/src/attcks/blejam.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_main,node_user toneBlue
class node_buttons,node_display toneAmber
class node_radio_manager,node_blejam toneMint
class node_button_matrix,node_oled,node_radio_hardware,node_nearby_devices toneIndigo
```

## Components

### Menu Control

- [Menu and Lifecycle](https://github.com/codeshark-lucifer/helios/blob/main/src/main.cpp): `src/main.cpp`

### User Interface

- [Button Scanner](https://github.com/codeshark-lucifer/helios/blob/main/include/utils/button.h): `include/utils/button.h`
- [OLED Display Setup](https://github.com/codeshark-lucifer/helios/blob/main/include/utils/display.h): `include/utils/display.h`

### Radio Operations

- [Radio Initialization and Checks](https://github.com/codeshark-lucifer/helios/blob/main/src/module/radio.cpp): `src/module/radio.cpp`
- [Radio Transmission Routine](https://github.com/codeshark-lucifer/helios/blob/main/src/attcks/blejam.cpp): `src/attcks/blejam.cpp`

### Other components

- **User**
- **Five-Button Matrix**
- **SSD1306 OLED**
- **Two nRF24 Radios**
- **Nearby Wireless Devices**

## Connections

- User → Five-Button Matrix: presses (evidence: `README.md`)
- Five-Button Matrix → Button Scanner: input signals (evidence: `include/utils/button.h`)
- Menu and Lifecycle → Button Scanner: scans buttons (evidence: `src/main.cpp`)
- Menu and Lifecycle → OLED Display Setup: initializes and renders (evidence: `src/main.cpp`)
- OLED Display Setup → SSD1306 OLED: initializes (evidence: `include/utils/display.h`)
- Menu and Lifecycle → Radio Initialization and Checks: initializes and checks (evidence: `src/main.cpp`)
- Radio Initialization and Checks → Two nRF24 Radios: initializes and tests (evidence: `src/module/radio.cpp`)
- Menu and Lifecycle → Radio Transmission Routine: dispatches actions (evidence: `src/main.cpp`)
- Radio Transmission Routine → Two nRF24 Radios: configures and transmits (evidence: `src/attcks/blejam.cpp`)
- Two nRF24 Radios → Nearby Wireless Devices: interference output (evidence: `README.md`)
