# omnia-makers/esp32_boat architecture

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

- Interactive diagram: https://gitdiagram.com/omnia-makers/esp32_boat
- Repository: https://github.com/omnia-makers/esp32_boat

## Overview

This is an ESP32 BLE remote-control system for a motor and servo. A user operates the web client, which sends joystick or slider commands over Web Bluetooth; the ESP32 receives and parses them, then applies motor power and servo position. The README documents client controls and feedback, plus command variants and hardware setup. The sketch and client implementation were not sampled, so their internal wiring is represented only where documented; feedback details are not linked to an unsampled firmware path.

Main entry points: [`connect/DataParser.cpp`](https://github.com/omnia-makers/esp32_boat/blob/main/connect/DataParser.cpp) (Command Parser), [`connect/bluetooth.cpp`](https://github.com/omnia-makers/esp32_boat/blob/main/connect/bluetooth.cpp) (BLE Server), [`client/index.html`](https://github.com/omnia-makers/esp32_boat/blob/main/client/index.html) (Joystick Client), [`connect/power.cpp`](https://github.com/omnia-makers/esp32_boat/blob/main/connect/power.cpp) (Motor Control)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web Client"]
  node_webclient["Joystick Client<br/>[index.html]"]
  node_browserble["Web Bluetooth"]
end

subgraph group_ble["BLE Transport"]
  node_sketch["Arduino Sketch<br/>[connect.ino]"]
  node_blemodule["BLE Server<br/>[bluetooth.cpp]"]
end

subgraph group_control["Command Control"]
  node_parser["Command Parser<br/>[DataParser.cpp]"]
end

subgraph group_actuation["Hardware Actuation"]
  node_power["Motor Control<br/>[power.cpp]"]
  node_servo["Servo Control<br/>[servo.cpp]"]
end

node_operator(("Operator"))
node_esp32["ESP32 BLE"]
node_motorhardware["Motor and L298N"]
node_servohardware["Servo Motor"]

node_operator -->|"operates"| node_webclient
node_webclient -->|"sends controls"| node_browserble
node_browserble -->|"writes commands"| node_esp32
node_sketch -->|"initializes BLE"| node_blemodule
node_esp32 -->|"hosts server"| node_blemodule
node_blemodule -->|"dispatches writes"| node_parser
node_parser -->|"sets motor power"| node_power
node_parser -->|"sets servo angle"| node_servo
node_power -->|"drives"| node_motorhardware
node_servo -->|"positions"| node_servohardware

click node_webclient "https://github.com/omnia-makers/esp32_boat/blob/main/client/index.html"
click node_sketch "https://github.com/omnia-makers/esp32_boat/blob/main/connect/connect.ino"
click node_blemodule "https://github.com/omnia-makers/esp32_boat/blob/main/connect/bluetooth.cpp"
click node_parser "https://github.com/omnia-makers/esp32_boat/blob/main/connect/DataParser.cpp"
click node_power "https://github.com/omnia-makers/esp32_boat/blob/main/connect/power.cpp"
click node_servo "https://github.com/omnia-makers/esp32_boat/blob/main/connect/servo.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_webclient,node_browserble toneBlue
class node_sketch,node_blemodule toneAmber
class node_parser toneMint
class node_power,node_servo toneRose
class node_operator,node_esp32,node_motorhardware,node_servohardware toneIndigo
```

## Components

### Web Client

- [Joystick Client](https://github.com/omnia-makers/esp32_boat/blob/main/client/index.html): `client/index.html`
- **Web Bluetooth**

### BLE Transport

- [Arduino Sketch](https://github.com/omnia-makers/esp32_boat/blob/main/connect/connect.ino): `connect/connect.ino`
- [BLE Server](https://github.com/omnia-makers/esp32_boat/blob/main/connect/bluetooth.cpp): `connect/bluetooth.cpp`

### Command Control

- [Command Parser](https://github.com/omnia-makers/esp32_boat/blob/main/connect/DataParser.cpp): `connect/DataParser.cpp`

### Hardware Actuation

- [Motor Control](https://github.com/omnia-makers/esp32_boat/blob/main/connect/power.cpp): `connect/power.cpp`
- [Servo Control](https://github.com/omnia-makers/esp32_boat/blob/main/connect/servo.cpp): `connect/servo.cpp`

### Other components

- **Operator**
- **ESP32 BLE**
- **Motor and L298N**
- **Servo Motor**

## Connections

- Operator → Joystick Client: operates
- Joystick Client → Web Bluetooth: sends controls
- Web Bluetooth → ESP32 BLE: writes commands
- Arduino Sketch → BLE Server: initializes BLE
- ESP32 BLE → BLE Server: hosts server
- BLE Server → Command Parser: dispatches writes
- Command Parser → Motor Control: sets motor power
- Command Parser → Servo Control: sets servo angle
- Motor Control → Motor and L298N: drives
- Servo Control → Servo Motor: positions
