# pratikphadte/esp32-flight-controller- architecture

> Architecture diagram of the GitHub repository pratikphadte/esp32-flight-controller-, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/pratikphadte/esp32-flight-controller-
- Repository: https://github.com/pratikphadte/esp32-flight-controller-

## Overview

This repository is an ESP32 quadcopter flight controller. Its documented workflow is to calibrate the IMU, copy the resulting values into the angle-mode flight sketch, tune PID gains over WiFi, then prepare and fly the quadcopter. Separate sketches support receiver, IMU, ESC/motor, and voltage checks. The source excerpts were unavailable, so relationships below rely on the README; implementation details and unmentioned runtime calls are omitted.

Main entry points: [`src/Anglemode_flightcontroller_ver3.1.ino`](https://github.com/pratikphadte/esp32-flight-controller-/blob/main/src/Anglemode_flightcontroller_ver3.1.ino) (Angle-mode controller), [`src/Gyro_accelerometer_calibration.ino`](https://github.com/pratikphadte/esp32-flight-controller-/blob/main/src/Gyro_accelerometer_calibration.ino) (IMU calibration), [`test/reciever_pwm_esp32/reciever_pwm_esp32.ino`](https://github.com/pratikphadte/esp32-flight-controller-/blob/main/test/reciever_pwm_esp32/reciever_pwm_esp32.ino) (Receiver signal check), [`test/measure_angles_from_mpu/measure_angles_from_mpu.ino`](https://github.com/pratikphadte/esp32-flight-controller-/blob/main/test/measure_angles_from_mpu/measure_angles_from_mpu.ino) (IMU angle check)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_flight["Flight Control"]
  node_flight_code["Angle-mode controller"]
end

subgraph group_setup["Calibration &amp; Tuning"]
  node_calibration["IMU calibration"]
  node_pid_tuning["WiFi PID tuning"]
end

subgraph group_checks["Bench Checks"]
  node_receiver_check["Receiver signal check"]
  node_angle_check["IMU angle check"]
  node_motor_check["ESC calibration"]
  node_voltage_check["Voltage check"]
  node_filter_check["Complementary filter demo"]
end

node_pilot(("Pilot"))
node_esp32["ESP32"]
node_imu["IMU"]
node_receiver["Receiver &amp; transmitter"]
node_esc["ESCs &amp; motors"]
node_battery["Voltage circuit"]

node_pilot -->|"runs calibration"| node_calibration
node_calibration -->|"calibrates"| node_imu
node_calibration -->|"supplies values"| node_flight_code
node_pilot -->|"tunes gains"| node_pid_tuning
node_pilot -->|"uploads and flies"| node_flight_code
node_flight_code -->|"runs on"| node_esp32
node_flight_code -->|"controls in flight"| node_esc
node_pilot -->|"runs to verify"| node_receiver_check
node_receiver_check -->|"checks signals"| node_receiver
node_pilot -->|"runs to verify"| node_angle_check
node_angle_check -->|"checks angles"| node_imu
node_pilot -->|"runs to calibrate"| node_motor_check
node_motor_check -->|"calibrates"| node_esc
node_pilot -->|"runs to validate"| node_voltage_check
node_voltage_check -->|"validates sensing"| node_battery
node_pilot -.->|"runs demo"| node_filter_check

click node_flight_code "https://github.com/pratikphadte/esp32-flight-controller-/blob/main/src/Anglemode_flightcontroller_ver3.1.ino"
click node_calibration "https://github.com/pratikphadte/esp32-flight-controller-/blob/main/src/Gyro_accelerometer_calibration.ino"
click node_pid_tuning "https://github.com/pratikphadte/esp32-flight-controller-/blob/main/test/anglemode_flightcontroller_ver3.1_PID_values_tuning_webserver/anglemode_flightcontroller_ver3.1_PID_values_tuning_webserver.ino"
click node_receiver_check "https://github.com/pratikphadte/esp32-flight-controller-/blob/main/test/reciever_pwm_esp32/reciever_pwm_esp32.ino"
click node_angle_check "https://github.com/pratikphadte/esp32-flight-controller-/blob/main/test/measure_angles_from_mpu/measure_angles_from_mpu.ino"
click node_motor_check "https://github.com/pratikphadte/esp32-flight-controller-/blob/main/test/motor_calibration_esp32/motor_calibration_esp32.ino"
click node_voltage_check "https://github.com/pratikphadte/esp32-flight-controller-/blob/main/test/Voltage_measurement_esp32/Voltage_measurement_esp32.ino"
click node_filter_check "https://github.com/pratikphadte/esp32-flight-controller-/blob/main/test/complementry_filter_webserver/complementry_filter_webserver.ino"

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_flight_code toneBlue
class node_calibration,node_pid_tuning toneAmber
class node_receiver_check,node_angle_check,node_motor_check,node_voltage_check,node_filter_check toneMint
class node_pilot,node_esp32,node_imu,node_receiver,node_esc,node_battery toneIndigo
```

## Components

### Flight Control

- [Angle-mode controller](https://github.com/pratikphadte/esp32-flight-controller-/blob/main/src/Anglemode_flightcontroller_ver3.1.ino): `src/Anglemode_flightcontroller_ver3.1.ino`

### Calibration & Tuning

- [IMU calibration](https://github.com/pratikphadte/esp32-flight-controller-/blob/main/src/Gyro_accelerometer_calibration.ino): `src/Gyro_accelerometer_calibration.ino`
- [WiFi PID tuning](https://github.com/pratikphadte/esp32-flight-controller-/blob/main/test/anglemode_flightcontroller_ver3.1_PID_values_tuning_webserver/anglemode_flightcontroller_ver3.1_PID_values_tuning_webserver.ino): `test/anglemode_flightcontroller_ver3.1_PID_values_tuning_webserver/anglemode_flightcontroller_ver3.1_PID_values_tuning_webserver.ino`

### Bench Checks

- [Receiver signal check](https://github.com/pratikphadte/esp32-flight-controller-/blob/main/test/reciever_pwm_esp32/reciever_pwm_esp32.ino): `test/reciever_pwm_esp32/reciever_pwm_esp32.ino`
- [IMU angle check](https://github.com/pratikphadte/esp32-flight-controller-/blob/main/test/measure_angles_from_mpu/measure_angles_from_mpu.ino): `test/measure_angles_from_mpu/measure_angles_from_mpu.ino`
- [ESC calibration](https://github.com/pratikphadte/esp32-flight-controller-/blob/main/test/motor_calibration_esp32/motor_calibration_esp32.ino): `test/motor_calibration_esp32/motor_calibration_esp32.ino`
- [Voltage check](https://github.com/pratikphadte/esp32-flight-controller-/blob/main/test/Voltage_measurement_esp32/Voltage_measurement_esp32.ino): `test/Voltage_measurement_esp32/Voltage_measurement_esp32.ino`
- [Complementary filter demo](https://github.com/pratikphadte/esp32-flight-controller-/blob/main/test/complementry_filter_webserver/complementry_filter_webserver.ino): `test/complementry_filter_webserver/complementry_filter_webserver.ino`

### Other components

- **Pilot**
- **ESP32**
- **IMU**
- **Receiver & transmitter**
- **ESCs & motors**
- **Voltage circuit**

## Connections

- Pilot → IMU calibration: runs calibration (evidence: `README.md`)
- IMU calibration → IMU: calibrates (evidence: `README.md`)
- IMU calibration → Angle-mode controller: supplies values (evidence: `README.md`)
- Pilot → WiFi PID tuning: tunes gains (evidence: `README.md`)
- Pilot → Angle-mode controller: uploads and flies (evidence: `README.md`)
- Angle-mode controller → ESP32: runs on (evidence: `README.md`)
- Angle-mode controller → ESCs & motors: controls in flight (evidence: `README.md`)
- Pilot → Receiver signal check: runs to verify (evidence: `README.md`)
- Receiver signal check → Receiver & transmitter: checks signals (evidence: `README.md`)
- Pilot → IMU angle check: runs to verify (evidence: `README.md`)
- IMU angle check → IMU: checks angles (evidence: `README.md`)
- Pilot → ESC calibration: runs to calibrate (evidence: `README.md`)
- ESC calibration → ESCs & motors: calibrates (evidence: `README.md`)
- Pilot → Voltage check: runs to validate (evidence: `README.md`)
- Voltage check → Voltage circuit: validates sensing (evidence: `README.md`)
- Pilot → Complementary filter demo: runs demo
