Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
qqqlab authored Nov 22, 2024
1 parent ac25259 commit f56e9c8
Showing 1 changed file with 20 additions and 22 deletions.
42 changes: 20 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
<img src="extras/img/logo/madflight_logo_2000x538.png" width="100%" />

***M**anless **A**erial **D**evice*

This is an Arduino library to build ESP32 / ESP32-S3 / RP2350 / RP2040 / STM32 flight controllers. A functional DIY flight controller can be build for under $10 from readily available development boards and sensor breakout boards. Ideal if you want to try out new flight control concepts, without first having to setup a build environment and without having to read through thousands lines of code to find the spot where you want to change something.
**madflight** is an Arduino library to build ESP32 / ESP32-S3 / RP2350 / RP2040 / STM32 flight controllers. A functional DIY flight controller can be build for under $10 from readily available [development boards](https://madflight.com/Controller-Boards/) and [sensor breakout boards](https://madflight.com/Sensor-Boards/). Ideal if you want to try out new flight control concepts, without first having to setup a build environment and without having to read through thousands lines of code to find the spot where you want to change something.

`Quadcopter.ino` is a 1000 line demo program for a quadcopter. It has been flight tested on ESP32, ESP32-S3, RP2350, RP2040, and STM32F405 microcontrollers with the Arduino IDE. The program can be easily adapted to control your plane or VTOL craft. The source code has extensive documentation explaning what the settings and functions do.

<img src="extras/img/madflight RP2040 flight controller.jpeg" title="madflight RP2040 flight controller" width="25%" /> <img src="extras/img/madflight drone.jpeg" title="madflight drone" width="19.6%" /> <img src="extras/img/madflight ESP32 flight controller.jpeg" title="madflight ESP32 flight controller" width="19.1%" />
---
<p align="center">If you like <b>madflight</b>, give it a &star; star, or fork it and contribute!</p>

## Feedback is Welcome
---

I enjoy hacking with electronics and I'm attempting to write some decent code for this project. If you enjoy it as well, please leave some feedback in the form of &star;&star;&star; Stars, Issues, Pull Requests, or Discussions. Thanks!
<img src="extras/img/madflight RP2040 flight controller.jpeg" title="madflight RP2040 flight controller" width="38%" /> <img src="extras/img/madflight drone.jpeg" title="madflight drone" width="30%" /> <img src="extras/img/madflight ESP32 flight controller.jpeg" title="madflight ESP32 flight controller" width="29%" />

## Required Hardware

- [Development board](https://madflight.com/Controller-Boards/):
- [RP2350/RP2040](https://madflight.com/Board-RP2040/) (e.g. Raspberry Pi Pico2)
- [ESP32-S3/ESP32](https://madflight.com/Board-ESP32/) (e.g. Espressiv ESP32-S3 DevKitC)
- [RP2350/RP2040](https://madflight.com/Board-RP2040/) (e.g. Raspberry Pi Pico/Pico2)
- [ESP32-S3/ESP32](https://madflight.com/Board-ESP32/) (e.g. Espressiv ESP32/ESP32-S3 DevKitC)
- [STM32](https://madflight.com/Board-STM32/) (e.g. Black Pill or a commercial flight controller)
- [SPI IMU sensor](https://madflight.com/Sensor-Boards/) (BMI270, MPU9250, MPU6500, or MPU6000), if not available then use an I2C IMU sensor (MPU6050 or MPU9150)
- RC Receiver: ELRS, CRSF, SBUS, DMSX, or PPM
Expand All @@ -26,7 +25,7 @@ I enjoy hacking with electronics and I'm attempting to write some decent code fo
## Optional Hardware

- GPS Module (Serial)
- Barometer (I2C BMP280, MS5611)
- Barometer (I2C BMP390, BMP388, BMP280, MS5611)
- Magnetometer (I2C QMC5883L)
- Current/Voltage Sensor (ADC or I2C INA226)
- [Optical Flow Sensor](https://github.com/qqqlab/ESP32-Optical-Flow) (I2C)
Expand All @@ -38,22 +37,21 @@ I enjoy hacking with electronics and I'm attempting to write some decent code fo
- -or- [ESP32-S3/ESP32 pinout and instructions](https://madflight.com/Board-ESP32/)
- -or- [STM32 pinout and instructions](https://madflight.com/Board-STM32/)
- Connect your IMU (gyro/acceleration) sensor as shown [here](https://madflight.com/).
- Install the madflight library in Arduino IDE. (Menu Tools->Manage Libraries, then search for "madflight")
- Open example Quadcopter.ino in the Arduino IDE.
- If you're not using a default pinout then setup your board pinout in the CUSTOM PINS section.
- Edit the HARDWARE section to enable the connected peripherals
- Compile and upload Quadcopter.ino to your board. Connect the Serial Monitor at 115200 baud and check the messages. Type `help` to see the available CLI commands.
- Use CLI print commands like `pimu`, `pgyro`, `proll` to Check that IMU sensor and AHRS are working correctly.
- IMPORTANT: Use CLI `calimu` and `calmag` to calibate the sensors.
- Connect radio receiver to your development board according to the configured pins.
- Edit the RC RECEIVER section. Either match you RC equipment to the settings, or change the settings to match your RC equipment.
- Check your radio setup: Use CLI `ppwm` and `pradio` to show pwm and scaled radio values.
- Connect motors (no props) and battery and check that motor outputs are working correctly. For debugging, use CLI `pmot` to show motor output.
- Mount props, go to an wide open space, and FLY!FLY!
- Connect your radio receiver according to the configured pins.
2. Install the madflight library in Arduino IDE. (Menu *Tools->Manage Libraries*, then search for **madflight**)
3. Open *Examples for custom libraries->madflight->Quadcopter.ino* in the Arduino IDE.
4. If you're not using the default pinout then setup your board pinout in the CUSTOM PINS section.
5. Edit the HARDWARE section to enable the connected peripherals.
6. Edit the RC RECEIVER section. Either match you RC equipment to the settings, or change the settings to match your RC equipment.
7. Compile Quadcopter.ino and upload it to your board. Connect the Serial Monitor at 115200 baud and check the messages. Type `help` to see the available CLI commands.
8. IMPORTANT: Use CLI `calimu` and `calmag` to calibate the sensors.
9. Use CLI print commands like `pimu`, `pahrs`, `pradio` to check that IMU sensor, AHRS and RC Receiver are working correctly.
10. Connect motors (no props) and battery and check that motors are spinning correctly. For debugging, use CLI `pmot` to show motor output.
11. Mount props, go to an wide open space, and FLY!

## Safety First!!!

By default madflight has these safety features enabled:
By default **madflight** has these safety features enabled:

- Motors only rotate when armed.
- Arming Procedure: set throttle low then flip the arm switch from disarmed to armed.
Expand Down

0 comments on commit f56e9c8

Please sign in to comment.