Making an ESP32-based quadcopter from scratch
Python arduinoautopilotcontrol-theorydroneesp32flight-controlflight-controllermavlinkquadcopterquadcopter-firmwareuav
Some updates to the docs
Oleg Kalacheva5e3dfcf695d
diff --git a/docs/book/firmware.md b/docs/book/firmware.mdindex d9e04c6..eb3c1c3 100644--- a/docs/book/firmware.md+++ b/docs/book/firmware.md@@ -35,7 +35,7 @@### Подсистема управления-Состояние органов управления обрабатывается в функции `interpretControls()` и преобразуется в *команду управления*, которая включает следующее:+Состояние органов управления обрабатывается в функции `interpretControls()` и преобразуется в **команду управления**, которая включает следующее:* `attitudeTarget` *(Quaternion)* — целевая ориентация дрона.* `ratesTarget` *(Vector)* — целевые угловые скорости, *рад/с*.diff --git a/docs/firmware.md b/docs/firmware.mdindex 337ebeb..c0b817c 100644--- a/docs/firmware.md+++ b/docs/firmware.md@@ -38,13 +38,13 @@ Utility files:### Control subsystem-Pilot inputs are interpreted in `interpretControls()`, and then converted to the *control command*, which consists of the following:+Pilot inputs are interpreted in `interpretControls()`, and then converted to the **control command**, which consists of the following:* `attitudeTarget` *(Quaternion)* — target attitude of the drone.* `ratesTarget` *(Vector)* — target angular rates, *rad/s*.* `ratesExtra` *(Vector)* — additional (feed-forward) angular rates , used for yaw rate control in STAB mode, *rad/s*.* `torqueTarget` *(Vector)* — target torque, range [-1, 1].-* `thrustTarget` *(float)* — collective thrust target, range [0, 1].+* `thrustTarget` *(float)* — collective motor thrust target, range [0, 1].Control command is handled in `controlAttitude()`, `controlRates()`, `controlTorque()` functions. Each function may be skipped if the corresponding control target is set to `NAN`.@@ -62,6 +62,11 @@ print("Test value: %.2f\n", testValue);In order to add a console command, modify the `doCommand()` function in `cli.ino` file.+> [!IMPORTANT]+> Avoid using delays in in-flight commands, it will **crash** the drone! (The design is one-threaded.)+>+> For on-the-ground commands, use `pause()` function, instead of `delay()`. This function allows to pause in a way that MAVLink connection will continue working.+## Building the firmwareSee build instructions in [usage.md](usage.md).diff --git a/docs/usage.md b/docs/usage.mdindex 17fbe2b..bfadfbf 100644--- a/docs/usage.md+++ b/docs/usage.md@@ -108,6 +108,8 @@ The drone is configured using parameters. To access and modify them, go to the Q<img src="img/parameters.png" width="400">+You can also work with parameters using `p` command in the console.+### Define IMU orientationUse parameters, to define the IMU board axes orientation relative to the drone's axes: `IMU_ROT_ROLL`, `IMU_ROT_PITCH`, and `IMU_ROT_YAW`.@@ -163,7 +165,7 @@ Before flight you need to calibrate the accelerometer:There are several ways to control the drone's flight: using **smartphone** (Wi-Fi), using **SBUS remote control**, or using **USB remote control** (Wi-Fi).-### Control with smartphone+### Control with a smartphone1. Install [QGroundControl mobile app](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/getting_started/download_and_install.html#android) on your smartphone.2. Power the drone using the battery.@@ -175,7 +177,7 @@ There are several ways to control the drone's flight: using **smartphone** (Wi-F> [!TIP]> Decrease `CTL_TILT_MAX` parameter when flying using the smartphone to make the controls less sensitive.-### Control with remote control+### Control with a remote controlBefore using remote SBUS-connected remote control, you need to calibrate it:@@ -183,7 +185,7 @@ Before using remote SBUS-connected remote control, you need to calibrate it:2. Type `cr` command and follow the instructions.3. Use the remote control to fly the drone!-### Control with USB remote control+### Control with a USB remote controlIf your drone doesn't have RC receiver installed, you can use USB remote control and QGroundControl app to fly it.diff --git a/docs/user.md b/docs/user.mdindex 00794e0..9f56d51 100644--- a/docs/user.md+++ b/docs/user.md@@ -16,7 +16,7 @@ Author: [goldarte](https://t.me/goldarte).<br>## School 548 course-Special quadcopter design and engineering course took place in october-november 2025 in School 548, Moscow. Course included UAV control theory, electronics, and practical drone assembly and setup using the Flix project.+Special course on quadcopter design and engineering took place in october-november 2025 in School 548, Moscow. The course included UAV control theory, electronics, drone assembly and setup practice, using the Flix project.<img height=200 src="img/user/school548/1.jpg"> <img height=200 src="img/user/school548/2.jpg"> <img height=200 src="img/user/school548/3.jpg">@@ -25,7 +25,7 @@ STL files and other materials: see [here](https://drive.google.com/drive/folders### Selected worksAuthor: [KiraFlux](https://t.me/@kiraflux_0XC0000005).<br>-Description: **custom ESPNOW remote control** is implemented, firmware modified to support ESPNOW protocol.<br>+Description: **custom ESPNOW remote control** was implemented, modified firmware to support ESPNOW protocol.<br>Telegram posts: [1](https://t.me/opensourcequadcopter/106), [2](https://t.me/opensourcequadcopter/114).<br>Modified Flix firmware: https://github.com/KiraFlux/flix/tree/klyax.<br>Remote control project: https://github.com/KiraFlux/ESP32-DJC.<br>diff --git a/tools/pyflix/README.md b/tools/pyflix/README.mdindex 96340a7..c336275 100644--- a/tools/pyflix/README.md+++ b/tools/pyflix/README.md@@ -95,7 +95,7 @@ Full list of events:|`armed`|Armed state update|Armed state (*bool*)||`mode`|Flight mode update|Flight mode (*str*)||`landed`|Landed state update|Landed state (*bool*)|-|`print`|The drone sends text to the console|Text|+|`print`|The drone prints text to the console|Text||`attitude`|Attitude update|Attitude quaternion (*list*)||`attitude_euler`|Attitude update|Euler angles (*list*)||`rates`|Angular rates update|Angular rates (*list*)|@@ -112,7 +112,7 @@ Full list of events:> [!NOTE]> Update events trigger on every new piece of data from the drone, and do not mean the value has changed.-### Common methods+### Basic methodsGet and set firmware parameters using `get_param` and `set_param` methods: