sidddy / flora

ESP32 BLE client for Xiaomi Mi Plant sensors
MIT License
190 stars 71 forks source link

Add platformio configuration. #25

Open bertrik opened 5 years ago

bertrik commented 5 years ago

This merge request add a platformio.ini file.

Platformio allows you to build the source code from the command line, automatically downloading the required toolchains, libraries and upload tools. This allows you, for example, to run an automated compile on travis-ci for example. It also takes the guesswork out of configuring the Arduino IDE, as things like the hardware, OTA configuration, library versions can all be specified.

You can install it on Linux as follows (example for debian): sudo apt-get install python-pip sudo pip install platformio Then compile the source code & upload the binary by running pio run -t upload

1technophile commented 5 years ago

you need to add esp32 ble library also

bertrik commented 5 years ago

The esp32 BLE library should already be included with the esp32 development environment that's downloaded by platformio, see also the README at https://github.com/nkolban/ESP32_BLE_Arduino

For me, it compiles and links fine like this.

1technophile commented 5 years ago

You are right, it is already provided.