diff --git a/README.md b/README.md index a333343..f3c871a 100644 --- a/README.md +++ b/README.md @@ -17,9 +17,20 @@ * *MAVLink support\*.* * *Completely 3D-printed frame*.* * *Position control and autonomous flights using external camera\**. +* [Building and running instructions](docs/build.md). *\* — planned.* +## Simulation + +Simulation in Gazebo using a plugin that runs original Arduino code is implemented: + + + +## Schematics + + + ## Version 0 ### Components @@ -27,7 +38,7 @@ |Component|Type|Image|Quantity| |-|-|-|-| |ESP32 Mini|Microcontroller board||1| -|GY-91|IMU+barometer board||1| +|GY-91|IMU+LDO+barometer board||1| |K100|Quadcopter frame||1| |8520 3.7V brushed motor|Motor||4| |Hubsan 55 mm| Propeller||4| diff --git a/docs/build.md b/docs/build.md new file mode 100644 index 0000000..b6863db --- /dev/null +++ b/docs/build.md @@ -0,0 +1,86 @@ +# Building and running + +## Simulation + +Dependencies are [Gazebo Classic simulator](https://classic.gazebosim.org) and [SDL2](https://www.libsdl.org) library. + +### Ubuntu + +1. Install Gazebo 11: + + ```bash + curl -sSL http://get.gazebosim.org | sh + ``` + + Set up your Gazebo environment variables: + + ```bash + echo "source /usr/share/gazebo/setup.sh" >> ~/.bashrc + source ~/.bashrc + ``` + +2. Install SDL2: + + ```bash + sudo apt-get install libsdl2-dev + ``` + +3. Run the simulation: + + ```bash + make simulator + ``` + +### macOS + +1. Install Homebrew package manager, if you don't have it installed: + + ```bash + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + ``` + +2. Install Gazebo 11 and SDL2: + + ```bash + brew tap osrf/simulation + brew install gazebo11 + brew install sdl2 + ``` + +3. Run the simulation: + + ```bash + make simulator + ``` + +## Firmware + +### Arduino IDE (Windows, Linux, macOS) + +1. Install [Arduino IDE](https://www.arduino.cc/en/software). +2. Install ESP32 core using [Boards Manager](https://docs.arduino.cc/learn/starting-guide/cores). +3. Build and upload the firmware using Arduino IDE. + +### Command line (Windows, Linux, macOS) + +1. [Install Arduino CLI](https://arduino.github.io/arduino-cli/installation/). +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. Compile the firmware using `make`. Arduino dependencies will be installed automatically: + + ```bash + make + ``` + + You can flash the firmware to the board using command: + + ```bash + make upload + ``` + + You can also compile the firmware, upload it and start serial port monitoring using command: + + ```bash + make upload monitor + ``` + +See other available Make commands in the [Makefile](../Makefile). diff --git a/docs/img/schematics.svg b/docs/img/schematics.svg new file mode 100644 index 0000000..bd2f996 --- /dev/null +++ b/docs/img/schematics.svg @@ -0,0 +1,782 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ESP32 + + + + + + + + + RC Receiver + + + + + + SBUS Inverter + + + + + + + + SPI + + + + + + + + UART + + + + + + + + SBUS + + + + + + + + PWM + + + + + + + + Voltage + + + + + + 3.7V + + 3.3V + LDO + + + + IMU GY-91 + + + + + + + + 3.3V + + + + + + Battery + + + + + + + + >3.7V + + + + + + + + >3.7V + + + + + + Motors + x4 + + + + + + ESC + x4 + + + diff --git a/docs/img/simulator.png b/docs/img/simulator.png new file mode 100644 index 0000000..2bcf872 Binary files /dev/null and b/docs/img/simulator.png differ