Skip to content

ESP12F and PlatformIO

giacomo892 edited this page Apr 3, 2020 · 2 revisions

This quick tutorial will cover how to build, upload and wire MavlinkToPassthru on an ESP12F.

Compile and upload the firmware:

  1. Get Visual Studio Code (VS code for short) and install PlatformIO IDE extension.
  2. Clone the git repo: git clone https://github.com/zs6buj/MavlinkToPassthru
  3. Open VS Code, and from the left column select the Platform IO one and press Open
  4. Select import Arduino project and navigate to the PlatformIO folder inside the MavlinkToPassthru folder selecting the version you want to compile. Selected as board a Generic ESP8266 ESP-01 and press import.
  5. Navigate to platformio.ini delete everything and add:
[env:esp01_1m] ; Generic ESP8266
platform = espressif8266
board = esp01_1m
framework = arduino
upload_speed = 115200
upload_port = COM(40) //set your port

Remember to save the file.

  1. Navigate to include/config.h and set:
#define GCS_Mavlink_IO  2 
#define ESP8266_Variant   2

as well as any other customizations you might want.

8.Hit the compile firmware, and a bin file will be generated inside the .pio folder. 9.You are now ready to flash it pressing the upload button. (be sure that your board is in bootloader mode!)

Wiring the board

ESP12F

Be sure to power the board with 3.3V, connect GPIO15 to ground, EN to 3.3V. This way the ESP12F can operate. Passthrough telemetry will be outputted from IO4 after you provide MAVLINK telemetry to the serial port (TXD0/RXD0)