Making an ESP32-based quadcopter from scratch
Python arduinoautopilotcontrol-theorydroneesp32flight-controlflight-controllermavlinkquadcopterquadcopter-firmwareuav
Support ESP32-C3 User Serial1 for rc instead of Serial2, as ESP32-C3 has only 2 Serials. Add CI build for ESP32-C3.
Oleg Kalachev35e94f6ea6c8
diff --git a/.github/workflows/build.yml b/.github/workflows/build.ymlindex 3bb9234..cd50ee2 100644--- a/.github/workflows/build.yml+++ b/.github/workflows/build.yml@@ -23,6 +23,8 @@ jobs:with:name: firmware-binarypath: flix/build+ - name: Build firmware for ESP32-C3+ run: make BOARD=esp32:esp32:esp32c3- name: Build firmware for ESP32-S3run: make BOARD=esp32:esp32:esp32s3- name: Check c_cpp_properties.jsondiff --git a/README.md b/README.mdindex 6501da5..649c559 100644--- a/README.md+++ b/README.md@@ -71,7 +71,7 @@ Additional articles:|Type|Part|Image|Quantity||-|-|:-:|:-:|-|Microcontroller board|ESP32 Mini|<img src="docs/img/esp32.jpg" width=100>|1|+|Microcontroller board|ESP32 Mini.<br>ESP32-S3/ESP32-C3 boards are also supported.|<img src="docs/img/esp32.jpg" width=100>|1||IMU (and barometer¹) board|GY‑91, MPU-9265 (or other MPU‑9250/MPU‑6500 board)<br>ICM20948V2 (ICM‑20948)<br>GY-521 (MPU-6050)|<img src="docs/img/gy-91.jpg" width=90 align=center><br><img src="docs/img/icm-20948.jpg" width=100><br><img src="docs/img/gy-521.jpg" width=100>|1||Boost converter (optional, for more stable power supply)|5V output|<img src="docs/img/buck-boost.jpg" width=100>|1||Motor|8520 3.7V brushed motor.<br>Motor with exact 3.7V voltage is needed, not ranged working voltage (3.7V — 6V).<br>Make sure the motor shaft diameter and propeller hole diameter match!|<img src="docs/img/motor.jpeg" width=100>|4|diff --git a/flix/rc.ino b/flix/rc.inoindex 8dfdadd..7433c72 100644--- a/flix/rc.ino+++ b/flix/rc.ino@@ -6,7 +6,7 @@#include <SBUS.h>#include "util.h"-SBUS rc(Serial2);+SBUS rc(Serial1);int rcRxPin = -1; // -1 means disableduint16_t channels[16]; // raw rc channelsdiff --git a/gazebo/Arduino.h b/gazebo/Arduino.hindex d0512a1..52c849b 100644--- a/gazebo/Arduino.h+++ b/gazebo/Arduino.h@@ -151,7 +151,7 @@ public:void setRxInvert(bool invert) {};};-HardwareSerial Serial, Serial2;+HardwareSerial Serial, Serial1, Serial2;class EspClass {public: