Updates in documentation

Fixes, updates, new illustrations.
This commit is contained in:
Oleg Kalachev
2025-11-10 20:13:39 +03:00
parent f1b993d719
commit 4d0871b00b
10 changed files with 318 additions and 58 deletions

View File

@@ -54,15 +54,17 @@ The simulator is implemented using Gazebo and runs the original Arduino code:
## Documentation ## Documentation
* [Assembly instructions](docs/assembly.md). 1. [Assembly instructions](docs/assembly.md).
* [Usage: build, setup and flight](docs/usage.md). 2. [Usage: build, setup and flight](docs/usage.md).
* [Troubleshooting](docs/troubleshooting.md). 3. [Simulation](gazebo/README.md).
* [Simulation](gazebo/README.md). 4. [Python library](tools/pyflix/README.md).
* [Firmware architectural overview](docs/firmware.md).
* [Python library](tools/pyflix/README.md). Additional articles:
* [Log analysis](docs/log.md).
* [User builds gallery](docs/user.md). * [User builds gallery](docs/user.md).
* [Version 0 (obsolete)](docs/version0.md). * [Firmware architectural overview](docs/firmware.md).
* [Troubleshooting](docs/troubleshooting.md).
* [Log analysis](docs/log.md).
## Components ## Components
@@ -80,9 +82,9 @@ The simulator is implemented using Gazebo and runs the original Arduino code:
|Li-Po Battery charger|Any|<img src="docs/img/charger.jpg" width=100>|1| |Li-Po Battery charger|Any|<img src="docs/img/charger.jpg" width=100>|1|
|Screws for IMU board mounting|M3x5|<img src="docs/img/screw-m3.jpg" width=100>|2| |Screws for IMU board mounting|M3x5|<img src="docs/img/screw-m3.jpg" width=100>|2|
|Screws for frame assembly|M1.4x5|<img src="docs/img/screw-m1.4.jpg" height=30 align=center>|4| |Screws for frame assembly|M1.4x5|<img src="docs/img/screw-m1.4.jpg" height=30 align=center>|4|
|Frame main part|3D printed²:<br>[`flix-frame-1.1.stl`](docs/assets/flix-frame-1.1.stl) [`flix-frame-1.1.step`](docs/assets/flix-frame-1.1.step)<br>Recommended settings: layer 0.2 mm, line 0.4 mm, infill 100%.|<img src="docs/img/frame1.jpg" width=100>|1| |Frame main part|3D printed²: [`stl`](docs/assets/flix-frame-1.1.stl) [`step`](docs/assets/flix-frame-1.1.step)<br>Recommended settings: layer 0.2 mm, line 0.4 mm, infill 100%.|<img src="docs/img/frame1.jpg" width=100>|1|
|Frame top part|3D printed:<br>[`esp32-holder.stl`](docs/assets/esp32-holder.stl) [`esp32-holder.step`](docs/assets/esp32-holder.step)|<img src="docs/img/esp32-holder.jpg" width=100>|1| |Frame top part|3D printed: [`stl`](docs/assets/esp32-holder.stl) [`step`](docs/assets/esp32-holder.step)|<img src="docs/img/esp32-holder.jpg" width=100>|1|
|Washer for IMU board mounting|3D printed:<br>[`washer-m3.stl`](docs/assets/washer-m3.stl) [`washer-m3.step`](docs/assets/washer-m3.step)|<img src="docs/img/washer-m3.jpg" width=100>|2| |Washer for IMU board mounting|3D printed: [`stl`](docs/assets/washer-m3.stl) [`step`](docs/assets/washer-m3.step)|<img src="docs/img/washer-m3.jpg" width=100>|2|
|Controller (recommended)|CC2500 transmitter, like BetaFPV LiteRadio CC2500 (RC receiver/Wi-Fi).<br>Two-sticks gamepad (Wi-Fi only) — see [recommended gamepads](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/setup_view/joystick.html#supported-joysticks).<br>Other⁵|<img src="docs/img/betafpv.jpg" width=100><img src="docs/img/logitech.jpg" width=80>|1| |Controller (recommended)|CC2500 transmitter, like BetaFPV LiteRadio CC2500 (RC receiver/Wi-Fi).<br>Two-sticks gamepad (Wi-Fi only) — see [recommended gamepads](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/setup_view/joystick.html#supported-joysticks).<br>Other⁵|<img src="docs/img/betafpv.jpg" width=100><img src="docs/img/logitech.jpg" width=80>|1|
|*RC receiver (optional)*|*DF500 or other³*|<img src="docs/img/rx.jpg" width=100>|1| |*RC receiver (optional)*|*DF500 or other³*|<img src="docs/img/rx.jpg" width=100>|1|
|Wires|28 AWG recommended|<img src="docs/img/wire-28awg.jpg" width=100>|| |Wires|28 AWG recommended|<img src="docs/img/wire-28awg.jpg" width=100>||
@@ -116,8 +118,6 @@ Motor connection scheme:
You can see a user-contributed [variant of complete circuit diagram](https://miro.com/app/board/uXjVN-dTjoo=/?moveToWidget=3458764612338222067&cot=14) of the drone. You can see a user-contributed [variant of complete circuit diagram](https://miro.com/app/board/uXjVN-dTjoo=/?moveToWidget=3458764612338222067&cot=14) of the drone.
See [assembly guide](docs/assembly.md) for instructions on assembling the drone.
### Notes ### Notes
* Power ESP32 Mini with Li-Po battery using VCC (+) and GND (-) pins. * Power ESP32 Mini with Li-Po battery using VCC (+) and GND (-) pins.
@@ -151,9 +151,9 @@ See [assembly guide](docs/assembly.md) for instructions on assembling the drone.
|-|-| |-|-|
|GND|GND| |GND|GND|
|VIN|VCC (or 3.3V depending on the receiver)| |VIN|VCC (or 3.3V depending on the receiver)|
|Signal (TX)|GPIO4| |Signal (TX)|GPIO4¹|
* — UART2 RX pin was [changed](https://docs.espressif.com/projects/arduino-esp32/en/latest/migration_guides/2.x_to_3.0.html#id14) to GPIO4 in Arduino ESP32 core 3.0.* *¹ — UART2 RX pin was [changed](https://docs.espressif.com/projects/arduino-esp32/en/latest/migration_guides/2.x_to_3.0.html#id14) to GPIO4 in Arduino ESP32 core 3.0.*
## Resources ## Resources

BIN
docs/img/arduino-ide.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

View File

@@ -0,0 +1,136 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 813.79 508.65">
<defs>
<style>
.a, .d, .f, .j, .p {
fill: none;
}
.a {
stroke: #d5d5d5;
stroke-width: 31px;
}
.a, .p {
stroke-miterlimit: 10;
}
.b {
fill: #ff9400;
}
.c {
opacity: 0.8;
}
.d {
stroke: #d80100;
}
.d, .f, .j {
stroke-linejoin: bevel;
stroke-width: 13px;
}
.e {
fill: #d80100;
}
.f {
stroke: #57ed00;
}
.g {
fill: #57ed00;
}
.h {
fill: #c1c1c1;
}
.i {
opacity: 0.12;
}
.j {
stroke: #0076ba;
}
.k {
fill: #0076ba;
}
.l {
font-size: 50px;
font-family: Tahoma;
}
.m {
letter-spacing: -0.01em;
}
.n {
letter-spacing: -0.01em;
}
.o {
letter-spacing: 0em;
}
.p {
stroke: #000;
stroke-width: 10px;
}
</style>
</defs>
<g>
<g>
<line class="a" x1="259.14" y1="432.84" x2="532.46" y2="340.23"/>
<line class="a" x1="311.69" y1="313.16" x2="481.62" y2="461.39"/>
<ellipse class="b" cx="311.35" cy="312.8" rx="88.68" ry="47.94"/>
<ellipse class="b" cx="532.53" cy="340.42" rx="88.68" ry="47.94"/>
<ellipse class="b" cx="479.72" cy="460.7" rx="88.68" ry="47.94"/>
<ellipse class="b" cx="259.21" cy="433.03" rx="88.68" ry="47.94"/>
</g>
<g class="c">
<g>
<line class="d" x1="396.65" y1="386.83" x2="564.66" y2="35.72"/>
<polygon class="e" points="582.76 51.95 579.15 5.42 540.66 31.8 582.76 51.95"/>
</g>
</g>
<g class="c">
<g>
<line class="f" x1="396.77" y1="387.06" x2="69.41" y2="341.09"/>
<polygon class="g" points="79.42 318.93 36.15 336.42 72.93 365.15 79.42 318.93"/>
</g>
</g>
<ellipse class="h" cx="396.36" cy="386.61" rx="47.21" ry="25.52"/>
<path class="i" d="M398,375.67l-14.42,12.95a4.32,4.32,0,0,0,2.35,7.5l16.81,2.11a4.33,4.33,0,0,0,4.8-5l-2.39-15.06A4.32,4.32,0,0,0,398,375.67Z"/>
<g class="c">
<g>
<line class="j" x1="396.77" y1="385.56" x2="396.77" y2="92.64"/>
<polygon class="k" points="420.1 99.47 396.77 59.06 373.43 99.47 420.1 99.47"/>
</g>
</g>
<text class="l" transform="translate(0 292.27)">y/left</text>
<text class="l" transform="translate(268.4 81.58)">z/up</text>
<text class="l" transform="translate(600.99 43.18)">x/<tspan class="m" x="43.87" y="0">f</tspan><tspan x="59.3" y="0">or</tspan><tspan class="n" x="104.47" y="0">w</tspan><tspan x="141.14" y="0">a</tspan><tspan class="o" x="167.38" y="0">r</tspan><tspan x="185.16" y="0">d</tspan></text>
<g class="c">
<g>
<path class="p" d="M470.35,114a52.71,52.71,0,0,1,103.57-2.31,51.67,51.67,0,0,1-1.33,25.92"/>
<polygon points="562.15 128.29 563.93 154.16 585.44 139.69 562.15 128.29"/>
</g>
</g>
<g class="c">
<g>
<path class="p" d="M344.16,164.77a52.66,52.66,0,1,0,103.78,16.31"/>
<polygon points="460.61 184.04 446.18 162.5 434.74 185.76 460.61 184.04"/>
</g>
</g>
<g class="c">
<g>
<path class="p" d="M138.4,411.11a52.71,52.71,0,0,1,18.43-101.94A51.68,51.68,0,0,1,182,315.65"/>
<polygon points="170.73 324.01 196.43 327.44 186.55 303.47 170.73 324.01"/>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.5 KiB

110
docs/img/drone-axes.svg Normal file
View File

@@ -0,0 +1,110 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 664.49 478.47">
<defs>
<style>
.a, .d, .f, .j {
fill: none;
}
.a {
stroke: #d5d5d5;
stroke-miterlimit: 10;
stroke-width: 31px;
}
.b {
fill: #ff9400;
}
.c {
opacity: 0.8;
}
.d {
stroke: #d80100;
}
.d, .f, .j {
stroke-linejoin: bevel;
stroke-width: 13px;
}
.e {
fill: #d80100;
}
.f {
stroke: #57ed00;
}
.g {
fill: #57ed00;
}
.h {
fill: #c1c1c1;
}
.i {
opacity: 0.12;
}
.j {
stroke: #0076ba;
}
.k {
fill: #0076ba;
}
.l {
font-size: 50px;
font-family: Tahoma;
}
.m {
letter-spacing: -0.01em;
}
.n {
letter-spacing: -0.01em;
}
.o {
letter-spacing: 0em;
}
</style>
</defs>
<g>
<g>
<line class="a" x1="207.39" y1="402.28" x2="480.71" y2="309.67"/>
<line class="a" x1="259.93" y1="282.6" x2="429.86" y2="430.83"/>
<ellipse class="b" cx="259.59" cy="282.24" rx="88.68" ry="47.94"/>
<ellipse class="b" cx="480.77" cy="309.86" rx="88.68" ry="47.94"/>
<ellipse class="b" cx="427.96" cy="430.14" rx="88.68" ry="47.94"/>
<ellipse class="b" cx="207.45" cy="402.47" rx="88.68" ry="47.94"/>
</g>
<g class="c">
<g>
<line class="d" x1="344.89" y1="356.27" x2="422.02" y2="172.47"/>
<polygon class="e" points="440.89 187.79 435.01 141.5 397.86 169.74 440.89 187.79"/>
</g>
</g>
<g class="c">
<g>
<line class="f" x1="345.01" y1="356.5" x2="79.27" y2="319.17"/>
<polygon class="g" points="89.28 297.01 46.01 314.5 82.78 343.23 89.28 297.01"/>
</g>
</g>
<ellipse class="h" cx="344.6" cy="356.05" rx="47.21" ry="25.52"/>
<path class="i" d="M346.25,345.11l-14.41,12.95a4.32,4.32,0,0,0,2.34,7.5L351,367.67a4.33,4.33,0,0,0,4.8-5l-2.39-15.06A4.31,4.31,0,0,0,346.25,345.11Z"/>
<g class="c">
<g>
<line class="j" x1="345.01" y1="355" x2="345.01" y2="62.08"/>
<polygon class="k" points="368.35 68.91 345.01 28.5 321.67 68.91 368.35 68.91"/>
</g>
</g>
<text class="l" transform="translate(-0.76 281.71)">y/left</text>
<text class="l" transform="translate(371.65 38.02)">z/up</text>
<text class="l" transform="translate(455.23 152.62)">x/<tspan class="m" x="43.87" y="0">f</tspan><tspan x="59.3" y="0">or</tspan><tspan class="n" x="104.47" y="0">w</tspan><tspan x="141.14" y="0">a</tspan><tspan class="o" x="167.38" y="0">r</tspan><tspan x="185.16" y="0">d</tspan></text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 46 KiB

View File

@@ -1,4 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 355.49 357.47"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 356.79 357.11">
<defs> <defs>
<style> <style>
.a, .e { .a, .e {
@@ -52,38 +52,38 @@
</defs> </defs>
<g> <g>
<g> <g>
<line class="a" x1="77" y1="279.14" x2="277" y2="78.14"/> <line class="a" x1="77.4" y1="278.67" x2="277.4" y2="77.67"/>
<line class="a" x1="78" y1="79.14" x2="278" y2="280.14"/> <line class="a" x1="78.4" y1="78.67" x2="278.4" y2="279.67"/>
<circle class="b" cx="177.5" cy="178.64" r="41.5"/> <circle class="b" cx="177.9" cy="178.17" r="41.5"/>
<circle class="c" cx="77.57" cy="78.64" r="77.95"/> <circle class="c" cx="77.97" cy="78.17" r="77.95"/>
<circle class="c" cx="277.13" cy="78.42" r="77.95"/> <circle class="c" cx="277.52" cy="77.95" r="77.95"/>
<circle class="c" cx="276.13" cy="279.42" r="77.95"/>
<circle class="c" cx="77.13" cy="279.42" r="77.95"/>
</g> </g>
<path class="d" d="M173.89,164.07l-8.44,26.05a4.31,4.31,0,0,0,4.1,5.65h16.9a4.32,4.32,0,0,0,4.11-5.65l-8.45-26.05A4.32,4.32,0,0,0,173.89,164.07Z"/> <path class="d" d="M174.29,163.6l-8.45,26.05A4.32,4.32,0,0,0,170,195.3h16.9a4.32,4.32,0,0,0,4.11-5.65l-8.45-26.05A4.32,4.32,0,0,0,174.29,163.6Z"/>
<g> <g>
<path class="e" d="M307.07,123A52.66,52.66,0,1,0,235,47"/> <path class="e" d="M307.47,122.53a52.66,52.66,0,1,0-72.08-76"/>
<polygon class="f" points="228.28 38.98 227.04 59.68 245.59 50.41 228.28 38.98"/> <polygon class="f" points="228.68 38.51 227.44 59.21 245.99 49.94 228.68 38.51"/>
</g> </g>
<g> <g>
<path class="e" d="M42.57,237.58a52.66,52.66,0,1,0,72.08,76"/> <path class="e" d="M48.11,122.22a52.66,52.66,0,1,1,72.08-75.95"/>
<polygon class="f" points="121.36 321.6 122.6 300.9 104.05 310.17 121.36 321.6"/> <polygon class="f" points="109.59 49.63 128.14 58.91 126.9 38.2 109.59 49.63"/>
</g> </g>
<text class="g" transform="translate(64.89 98.77)">3</text>
<text class="g" transform="translate(260.92 98.8)">2</text>
<text class="h" transform="translate(66.06 129.25)">p<tspan class="i" x="11.05" y="0">r</tspan><tspan x="18.16" y="0">op A</tspan></text>
<text class="h" transform="translate(232.55 128.95)">p<tspan class="i" x="11.05" y="0">r</tspan><tspan x="18.16" y="0">op B</tspan></text>
<circle class="c" cx="278.83" cy="277.92" r="77.95"/>
<g> <g>
<path class="e" d="M311.89,237.58a52.66,52.66,0,1,1-72.08,76"/> <path class="e" d="M249,322a52.66,52.66,0,1,1,72.09-76"/>
<polygon class="f" points="250.41 310.17 231.86 300.9 233.1 321.6 250.41 310.17"/> <polygon class="f" points="310.45 249.38 329 258.66 327.76 237.95 310.45 249.38"/>
</g> </g>
<text class="g" transform="translate(265.76 298.52)">1</text>
<text class="h" transform="translate(266.92 329.01)">p<tspan class="i" x="11.05" y="0">r</tspan><tspan x="18.16" y="0">op A</tspan></text>
<circle class="c" cx="77.95" cy="277.92" r="77.95"/>
<g> <g>
<path class="e" d="M47.71,122.69a52.66,52.66,0,1,1,72.08-75.95"/> <path class="e" d="M107.9,322.49a52.66,52.66,0,1,0-72.08-76"/>
<polygon class="f" points="109.19 50.1 127.74 59.38 126.5 38.67 109.19 50.1"/> <polygon class="f" points="29.11 238.47 27.87 259.18 46.42 249.91 29.11 238.47"/>
</g> </g>
<text class="g" transform="translate(64.5 99.24)">3</text> <text class="g" transform="translate(61.35 298.76)">0</text>
<text class="g" transform="translate(63.52 297.27)">0</text> <text class="h" transform="translate(32.98 328.92)">p<tspan class="i" x="11.05" y="0">r</tspan><tspan x="18.16" y="0">op B</tspan></text>
<text class="g" transform="translate(263.52 298.27)">1</text>
<text class="g" transform="translate(260.52 99.27)">2</text>
<text class="h" transform="translate(65.66 129.73)">p<tspan class="i" x="11.05" y="0">r</tspan><tspan x="18.16" y="0">op A</tspan></text>
<text class="h" transform="translate(233.66 245.73)">p<tspan class="i" x="11.05" y="0">r</tspan><tspan x="18.16" y="0">op A</tspan></text>
<text class="h" transform="translate(232.15 129.42)">p<tspan class="i" x="11.05" y="0">r</tspan><tspan x="18.16" y="0">op B</tspan></text>
<text class="h" transform="translate(67.15 245.42)">p<tspan class="i" x="11.05" y="0">r</tspan><tspan x="18.16" y="0">op B</tspan></text>
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@@ -16,6 +16,8 @@ You can build and upload the firmware using either **Arduino IDE** (easier for b
### Arduino IDE (Windows, Linux, macOS) ### Arduino IDE (Windows, Linux, macOS)
<img src="img/arduino-ide.png" width="400" alt="Flix firmware open in Arduino IDE">
1. Install [Arduino IDE](https://www.arduino.cc/en/software) (version 2 is recommended). 1. Install [Arduino IDE](https://www.arduino.cc/en/software) (version 2 is recommended).
2. *Windows users might need to install [USB to UART bridge driver from Silicon Labs](https://www.silabs.com/developers/usb-to-uart-bridge-vcp-drivers).* 2. *Windows users might need to install [USB to UART bridge driver from Silicon Labs](https://www.silabs.com/developers/usb-to-uart-bridge-vcp-drivers).*
3. Install ESP32 core, version 3.2.0. See the [official Espressif's instructions](https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html#installing-using-arduino-ide) on installing ESP32 Core in Arduino IDE. 3. Install ESP32 core, version 3.2.0. See the [official Espressif's instructions](https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html#installing-using-arduino-ide) on installing ESP32 Core in Arduino IDE.
@@ -73,9 +75,11 @@ MPU6050 imu(Wire); // For MPU-6050
### Setup the IMU orientation ### Setup the IMU orientation
The IMU orientation is defined in `rotateIMU` function in the `imu.ino` file. Change it so it converts the IMU axes to the drone's axes correctly. **Drone axes are X forward, Y left, Z up.** The IMU orientation is defined in `rotateIMU` function in the `imu.ino` file. Change it so it converts the IMU axes to the drone's axes correctly. **Drone axes are X forward, Y left, Z up**:
See various [IMU axes orientations table](https://github.com/okalachev/flixperiph/?tab=readme-ov-file#imu-axes-orientation) to help you set up the correct orientation. <img src="img/drone-axes.svg" width="200">
See various [IMU boards axes orientations table](https://github.com/okalachev/flixperiph/?tab=readme-ov-file#imu-axes-orientation) to help you set up the correct orientation.
### Connect using QGroundControl ### Connect using QGroundControl
@@ -93,44 +97,51 @@ The console is a command line interface (CLI) that allows to interact with the d
To access the console using serial port: To access the console using serial port:
1. Connect the ESP32 board to the computer using USB cable. 1. Connect the ESP32 board to the computer using USB cable.
2. Open Serial Monitor in Arduino IDE (or use `make monitor` command in the command line). 2. Open Serial Monitor in Arduino IDE (or use `make monitor` in the command line).
3. In Arduino IDE, make sure the baudrate is set to 115200. 3. In Arduino IDE, make sure the baudrate is set to 115200.
To access the console wirelessly using QGroundControl: To access the console using QGroundControl:
1. Connect to the drone using QGroundControl app. 1. Connect to the drone using QGroundControl app.
2. Go to the QGroundControl menu ⇒ *Vehicle Setup* ⇒ *Analyze Tools* ⇒ *MAVLink Console*. 2. Go to the QGroundControl menu ⇒ *Vehicle Setup* ⇒ *Analyze Tools* ⇒ *MAVLink Console*.
<img src="img/cli.png" width="400"> <img src="img/cli.png" width="400">
Use `help` command to see the list of available commands. > [!TIP]
> Use `help` command to see the list of available commands.
### Calibrate accelerometer ### Calibrate accelerometer
Before flight you need to calibrate the accelerometer: Before flight you need to calibrate the accelerometer:
1. Access the console using QGroundControl (more convenient) or Serial Monitor. 1. Access the console using QGroundControl (recommended) or Serial Monitor.
2. Type `ca` command there and follow the instructions. 2. Type `ca` command there and follow the instructions.
### Check everything works ### Check everything works
1. Check the IMU is working: perform `imu` command and check its output: 1. Check the IMU is working: perform `imu` command and check its output:
* The `status` field should be `OK`. * The `status` field should be `OK`.
* The `rate` field should be about 1000 (Hz). * The `rate` field should be about 1000 (Hz).
* The `accel` and `gyro` fields should change as you move the drone. * The `accel` and `gyro` fields should change as you move the drone.
* The `landed` field should be `1` when the drone is still on the ground and `0` when you lift it up.
2. Check the attitude estimation: connect to the drone using QGroundControl, rotate the drone in different orientations and check if the attitude estimation shown in QGroundControl is correct. Attitude indicator in QGroundControl is shown below: 2. Check the attitude estimation: connect to the drone using QGroundControl, rotate the drone in different orientations and check if the attitude estimation shown in QGroundControl is correct. Attitude indicator in QGroundControl is shown below:
<img src="img/qgc-attitude.png" height="200"> <img src="img/qgc-attitude.png" height="200">
3. Perform motor tests in the console. **Remove the propellers before this!** Use the following commands: 3. Perform motor tests in the console. Use the following commands **— remove the propellers before running the tests!**
* `mfr` — should rotate front right motor (counter-clockwise). * `mfr` — should rotate front right motor (counter-clockwise).
* `mfl` — should rotate front left motor (clockwise). * `mfl` — should rotate front left motor (clockwise).
* `mrl` — should rotate rear left motor (counter-clockwise). * `mrl` — should rotate rear left motor (counter-clockwise).
* `mrr` — should rotate rear right motor (clockwise). * `mrr` — should rotate rear right motor (clockwise).
> [!WARNING]
> Never run the motors when powering the drone from USB, always use the battery for that.
## Setup remote control ## Setup remote control
There are several ways to control the drone's flight: using **smartphone** (Wi-Fi), using **standard radio remote control**, or using **USB remote control** (Wi-Fi). 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 smartphone
@@ -146,10 +157,10 @@ There are several ways to control the drone's flight: using **smartphone** (Wi-F
### Control with remote control ### Control with remote control
Before flight using remote control, you need to calibrate it: Before using remote SBUS-connected remote control, you need to calibrate it:
1. Open Serial Monitor in Arduino IDE (or use `make monitor` command in the command line). 1. Access the console using QGroundControl (recommended) or Serial Monitor.
2. Type `cr` command there and follow the instructions. 2. Type `cr` command and follow the instructions.
3. Use the remote control to fly the drone! 3. Use the remote control to fly the drone!
### Control with USB remote control ### Control with USB remote control

View File

@@ -14,7 +14,7 @@ Flix version 0 (obsolete):
|Motor|8520 3.7V brushed motor (**shaft 0.8mm!**)|<img src="img/motor.jpeg" width=100>|4| |Motor|8520 3.7V brushed motor (**shaft 0.8mm!**)|<img src="img/motor.jpeg" width=100>|4|
|Propeller|Hubsan 55 mm|<img src="img/prop.jpg" width=100>|4| |Propeller|Hubsan 55 mm|<img src="img/prop.jpg" width=100>|4|
|Motor ESC|2.7A 1S Dual Way Micro Brush ESC|<img src="img/esc.jpg" width=100>|4| |Motor ESC|2.7A 1S Dual Way Micro Brush ESC|<img src="img/esc.jpg" width=100>|4|
|RC transmitter|KINGKONG TINY X8|<img src="img/tx.jpg" width=100>|1| |RC transmitter|KINGKONG TINY X8|<img src="img/kingkong.jpg" width=100>|1|
|RC receiver|DF500 (SBUS)|<img src="img/rx.jpg" width=100>|1| |RC receiver|DF500 (SBUS)|<img src="img/rx.jpg" width=100>|1|
|~~SBUS inverter~~*||<img src="img/inv.jpg" width=100>|~~1~~| |~~SBUS inverter~~*||<img src="img/inv.jpg" width=100>|~~1~~|
|Battery|3.7 Li-Po 850 MaH 60C||| |Battery|3.7 Li-Po 850 MaH 60C|||

View File

@@ -4,7 +4,7 @@ The Flix drone simulator is based on Gazebo 11 and runs the firmware code in vir
Gazebo 11 works on **Ubuntu 20.04** and used to work on macOS. However, on the recent macOS versions it seems to be broken, so Ubuntu 20.04 is recommended. Gazebo 11 works on **Ubuntu 20.04** and used to work on macOS. However, on the recent macOS versions it seems to be broken, so Ubuntu 20.04 is recommended.
<img src="../docs/img/simulator1.png" width=600 alt="Flix simulator"> <img src="../docs/img/simulator1.png" width=600 alt="Flix simulator running on macOS">
## Installation ## Installation

View File

@@ -46,8 +46,11 @@ print(flix.acc) # accelerometer output (list)
print(flix.gyro) # gyroscope output (list) print(flix.gyro) # gyroscope output (list)
``` ```
> [!NOTE] The library uses the Front-Left-Up coordinate system — the same as the firmware:
> The library uses the Front-Left-Up coordinate system — the same as in the firmware. All angles are in radians.
<img src="../../docs/img/drone-axes-rotate.svg" width="300">
All angles are in radians.
### Events ### Events
@@ -107,7 +110,7 @@ Full list of events:
|`value.<name>`|Specific named value update (see bellow)|Value| |`value.<name>`|Specific named value update (see bellow)|Value|
> [!NOTE] > [!NOTE]
> Update events trigger on every new data from the drone, and do not mean the value is changed. > Update events trigger on every new data from the drone, and do not mean the value has changed.
### Common methods ### Common methods
@@ -118,7 +121,7 @@ pitch_p = flix.get_param('PITCH_P') # get parameter value
flix.set_param('PITCH_P', 5) # set parameter value flix.set_param('PITCH_P', 5) # set parameter value
``` ```
Execute CLI commands using `cli` method. This method returns command response: Execute console commands using `cli` method. This method returns command response:
```python ```python
imu = flix.cli('imu') # get detailed IMU data imu = flix.cli('imu') # get detailed IMU data
@@ -136,7 +139,7 @@ flix.set_armed(True) # arm the drone
flix.set_armed(False) # disarm the drone flix.set_armed(False) # disarm the drone
``` ```
You can imitate pilot's controls using `set_controls` method: You can pass pilot's controls using `set_controls` method:
```python ```python
flix.set_controls(roll=0, pitch=0, yaw=0, throttle=0.6) flix.set_controls(roll=0, pitch=0, yaw=0, throttle=0.6)