These steps below show how to build the firmware using PlatformIO.
-
Install PlatformIO and NodeJS.
-
Make sure PlatformIO is updated to the latest
pio upgrade pio update
-
Download the EMS-ESP source code
git clone https://github.com/emsesp/EMS-ESP32 cd EMS-ESP32
-
Optional: If you want to use the latest development version use
git checkout dev
-
Decide how you want to upload the firmware, via USB or OTA (Over The Air). OTA requires that a version of EMS-ESP is already running.
-
Create a new file called
pio_local.ini
and add these lines for USB replacing with the COM port you're using:[env] upload_protocol = esptool upload_port = <COM PORT>
or these for OTA:
[env] upload_protocol = espota upload_flags = --port=8266 --auth=ems-esp-neo upload_port = ems-esp.local
-
Now build and upload the firmware with
pio run -t upload