# amvaloor/eecs473-rowing-telemetry architecture

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

- Interactive diagram: https://gitdiagram.com/amvaloor/eecs473-rowing-telemetry
- Repository: https://github.com/amvaloor/eecs473-rowing-telemetry

## Overview

This repository combines rowing telemetry firmware with an Android display. The intended flow is oar sensing, wireless collection at the central unit, then coaching output and app-facing telemetry. The app already has a Compose display and a UDP receive/parse loop, although the README describes the app as not started. Firmware unit headers establish the sensor and communications dependencies; excerpts do not show most unit implementations, so uncertain runtime links are omitted or marked unverified.

Main entry points: [`firmware/src/oar/oar_unit.cpp`](https://github.com/amvaloor/eecs473-rowing-telemetry/blob/main/firmware/src/oar/oar_unit.cpp) (Oar Unit), [`firmware/src/central/central_unit.cpp`](https://github.com/amvaloor/eecs473-rowing-telemetry/blob/main/firmware/src/central/central_unit.cpp) (Central Unit), [`firmware/src/coach/coach_unit.cpp`](https://github.com/amvaloor/eecs473-rowing-telemetry/blob/main/firmware/src/coach/coach_unit.cpp) (Coach Unit), [`firmware/components/rowing_espnow/rowing_espnow.cpp`](https://github.com/amvaloor/eecs473-rowing-telemetry/blob/main/firmware/components/rowing_espnow/rowing_espnow.cpp) (ESP-NOW)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_android["Android App"]
  node_app["Telemetry UI<br/>[MainActivity.kt]"]
  node_colors["Theme Colors<br/>[Color.kt]"]
end

subgraph group_units["Firmware Units"]
  node_oar["Oar Unit<br/>[oar_unit.cpp]"]
  node_central["Central Unit<br/>[central_unit.cpp]"]
  node_coach["Coach Unit<br/>[coach_unit.cpp]"]
end

subgraph group_drivers["Firmware Components"]
  node_imu["IMU<br/>[rowing_imu.cpp]"]
  node_strain["Strain Gauges"]
  node_espnow["ESP-NOW<br/>[rowing_espnow.cpp]"]
  node_softap["Wi-Fi SoftAP<br/>[rowing_softap.cpp]"]
  node_usb["USB Output<br/>[rowing_usb.cpp]"]
end

node_rower(("Rower"))
node_boatnet(("Boat Wi-Fi"))
node_laptop(("Coach Laptop"))

node_rower -->|"rows with"| node_oar
node_oar -.->|"uses sensor"| node_imu
node_oar -.->|"uses gauges"| node_strain
node_oar -.->|"sends packets"| node_espnow
node_central -.->|"collects packets"| node_espnow
node_central -.->|"hosts network"| node_softap
node_coach -.->|"receives packets"| node_espnow
node_coach -.->|"writes data"| node_usb
node_central -.->|"serves telemetry"| node_boatnet
node_boatnet -.->|"sends UDP"| node_app
node_app -->|"uses theme"| node_colors
node_coach -.->|"outputs data"| node_laptop

click node_app "https://github.com/amvaloor/eecs473-rowing-telemetry/blob/main/app/app/src/main/java/com/rowing/telemetry/MainActivity.kt"
click node_colors "https://github.com/amvaloor/eecs473-rowing-telemetry/blob/main/app/app/src/main/java/com/rowing/telemetry/ui/theme/Color.kt"
click node_oar "https://github.com/amvaloor/eecs473-rowing-telemetry/blob/main/firmware/src/oar/oar_unit.cpp"
click node_central "https://github.com/amvaloor/eecs473-rowing-telemetry/blob/main/firmware/src/central/central_unit.cpp"
click node_coach "https://github.com/amvaloor/eecs473-rowing-telemetry/blob/main/firmware/src/coach/coach_unit.cpp"
click node_imu "https://github.com/amvaloor/eecs473-rowing-telemetry/blob/main/firmware/components/rowing_imu/rowing_imu.cpp"
click node_strain "https://github.com/amvaloor/eecs473-rowing-telemetry/blob/main/firmware/components/rowing_strain_gauge/rowing_strain_gauge.cpp"
click node_espnow "https://github.com/amvaloor/eecs473-rowing-telemetry/blob/main/firmware/components/rowing_espnow/rowing_espnow.cpp"
click node_softap "https://github.com/amvaloor/eecs473-rowing-telemetry/blob/main/firmware/components/rowing_softap/rowing_softap.cpp"
click node_usb "https://github.com/amvaloor/eecs473-rowing-telemetry/blob/main/firmware/components/rowing_usb/rowing_usb.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_app,node_colors toneBlue
class node_oar,node_central,node_coach toneAmber
class node_imu,node_strain,node_espnow,node_softap,node_usb toneMint
class node_rower,node_boatnet,node_laptop toneIndigo
```

## Components

### Android App

- [Telemetry UI](https://github.com/amvaloor/eecs473-rowing-telemetry/blob/main/app/app/src/main/java/com/rowing/telemetry/MainActivity.kt): `app/app/src/main/java/com/rowing/telemetry/MainActivity.kt`
- [Theme Colors](https://github.com/amvaloor/eecs473-rowing-telemetry/blob/main/app/app/src/main/java/com/rowing/telemetry/ui/theme/Color.kt): `app/app/src/main/java/com/rowing/telemetry/ui/theme/Color.kt`

### Firmware Units

- [Oar Unit](https://github.com/amvaloor/eecs473-rowing-telemetry/blob/main/firmware/src/oar/oar_unit.cpp): `firmware/src/oar/oar_unit.cpp`
- [Central Unit](https://github.com/amvaloor/eecs473-rowing-telemetry/blob/main/firmware/src/central/central_unit.cpp): `firmware/src/central/central_unit.cpp`
- [Coach Unit](https://github.com/amvaloor/eecs473-rowing-telemetry/blob/main/firmware/src/coach/coach_unit.cpp): `firmware/src/coach/coach_unit.cpp`

### Firmware Components

- [IMU](https://github.com/amvaloor/eecs473-rowing-telemetry/blob/main/firmware/components/rowing_imu/rowing_imu.cpp): `firmware/components/rowing_imu/rowing_imu.cpp`
- [Strain Gauges](https://github.com/amvaloor/eecs473-rowing-telemetry/blob/main/firmware/components/rowing_strain_gauge/rowing_strain_gauge.cpp): `firmware/components/rowing_strain_gauge/rowing_strain_gauge.cpp`
- [ESP-NOW](https://github.com/amvaloor/eecs473-rowing-telemetry/blob/main/firmware/components/rowing_espnow/rowing_espnow.cpp): `firmware/components/rowing_espnow/rowing_espnow.cpp`
- [Wi-Fi SoftAP](https://github.com/amvaloor/eecs473-rowing-telemetry/blob/main/firmware/components/rowing_softap/rowing_softap.cpp): `firmware/components/rowing_softap/rowing_softap.cpp`
- [USB Output](https://github.com/amvaloor/eecs473-rowing-telemetry/blob/main/firmware/components/rowing_usb/rowing_usb.cpp): `firmware/components/rowing_usb/rowing_usb.cpp`

### Other components

- **Rower**
- **Boat Wi-Fi**
- **Coach Laptop**

## Connections

- Rower → Oar Unit: rows with (evidence: `README.md`)
- Oar Unit → IMU: uses sensor
- Oar Unit → Strain Gauges: uses gauges
- Oar Unit → ESP-NOW: sends packets
- Central Unit → ESP-NOW: collects packets
- Central Unit → Wi-Fi SoftAP: hosts network
- Coach Unit → ESP-NOW: receives packets
- Coach Unit → USB Output: writes data
- Central Unit → Boat Wi-Fi: serves telemetry
- Boat Wi-Fi → Telemetry UI: sends UDP
- Telemetry UI → Theme Colors: uses theme (evidence: `app/app/src/main/java/com/rowing/telemetry/MainActivity.kt`)
- Coach Unit → Coach Laptop: outputs data
