Making an ESP32-based quadcopter from scratch
Python arduinoautopilotcontrol-theorydroneesp32flight-controlflight-controllermavlinkquadcopterquadcopter-firmwareuav
Make all the basic functionality work without the imu
Oleg Kalacheve54e0e8c4810
diff --git a/docs/build.md b/docs/build.mdindex e4a14f5..02d3179 100644--- a/docs/build.md+++ b/docs/build.md@@ -146,6 +146,9 @@ The latest version of Ubuntu supported by Gazebo 11 simulator is 20.04. If you hSee other available Make commands in the [Makefile](../Makefile).+> [!TIP]+> You can test the firmware on a bare ESP32 board without connecting IMU and other peripherals. The Wi-Fi network `flix` should appear and all the basic functionality including CLI and QGroundControl connection should work.+### Setup and flightBefore flight you need to calibrate the accelerometer:diff --git a/flix/imu.ino b/flix/imu.inoindex 549d6ba..2bdcbcc 100644--- a/flix/imu.ino+++ b/flix/imu.ino@@ -15,13 +15,7 @@ Vector accScale(1, 1, 1);void setupIMU() {Serial.println("Setup IMU");- bool status = IMU.begin();- if (!status) {- while (true) {- Serial.println("IMU begin error");- delay(1000);- }- }+ IMU.begin();configureIMU();delay(500); // wait a bit before calibratingcalibrateGyro();@@ -129,6 +123,7 @@ void printIMUCal() {}void printIMUInfo() {+ IMU.status() ? Serial.printf("status: ERROR %d\n", IMU.status()) : Serial.println("status: OK");Serial.printf("model: %s\n", IMU.getModel());Serial.printf("who am I: 0x%02X\n", IMU.whoAmI());}