PlatformIO Configuration
Project Configuration with PlatformIO
All platformio projects have a main configuration file called platformio.ini
. Rhomb.IoT is compatible with multiple microcontrollers. In this file you can configure the microcontroller you will be using and other parameters such as the upload method.
Default platformio.ini:
; PlatformIO Project Configuration File for rhomb.iot
;
; Read more: https://rhiot.rhomb.io/users/platformio-configuration/
;
; This file is used by PlatformIO to compile and upload the code to the device.
; Platformio Documentation: https://docs.platformio.org/page/projectconf.html
[user]
upload_port = COMx
monitor_port = COMx
monitor_speed = 115200
[platformio]
default_envs = zeroUSB
data_dir = lib/rhomb.iot/data
[common]
lib_deps =
https://github.com/BoschSensortec/BSEC-Arduino-library
https://github.com/sparkfun/SparkFun_BME280_Arduino_Library
https://github.com/mikalhart/TinyGPSPlus
https://github.com/adafruit/Adafruit_Sensor
https://github.com/adafruit/DHT-sensor-library
https://github.com/timotto/Readline
https://github.com/Rhomb-io/rhio-pinmap
https://github.com/adafruit/Adafruit-PN532
https://github.com/Rhomb-io/rhio-state-machine
https://github.com/adafruit/Adafruit-GFX-Library.git
https://github.com/adafruit/Adafruit_ILI9341.git
https://github.com/Rhomb-io/rhio-flash
https://gitlab.com/rhombio/rhio-libraries/rhio-ioexpander.git
[env:esp32]
platform = espressif32
board = esp32dev
framework = arduino
;upload_port = ${user.upload_port}
;monitor_port = ${user.monitor_port}
monitor_speed = ${user.monitor_speed}
monitor_filters = esp32_exception_decoder
board_build.partitions = no_ota.csv
build_flags = -L.pio/libdeps/esp32/BSEC\ Software\ Library/src/esp32 -lalgobsec
lib_deps =
${common.lib_deps}
https://github.com/arduino-libraries/NTPClient
https://github.com/me-no-dev/ESPAsyncWebServer
[env:zeroUSB]
platform = atmelsam
board = zeroUSB
framework = arduino
upload_port = ${user.upload_port}
monitor_port = ${user.monitor_port}
monitor_speed = ${user.monitor_speed}
build_flags = -L.pio/libdeps/zeroUSB/BSEC\ Software\ Library/src/cortex-m0plus/ -lalgobsec
lib_deps =
${common.lib_deps}
https://github.com/cmaglie/FlashStorage
https://github.com/adafruit/Adafruit_SleepyDog
https://github.com/mpflaga/Arduino-MemoryFree
https://github.com/EHbtj/ZeroTimer
[env:espressif8266]
platform = espressif8266
board = esp_wroom_02
framework = arduino
monitor_port = ${user.monitor_port}
monitor_speed = ${user.monitor_speed}
[env:uno]
platform = atmelavr
framework = arduino
board = uno
monitor_port = ${user.monitor_port}
monitor_speed = ${user.monitor_speed}
lib_deps = ${common.lib_deps}
[env:mega]
platform = atmelavr
board = megaatmega2560
framework = arduino
upload_port = ${user.upload_port}
monitor_port = ${user.monitor_port}
monitor_speed = ${user.monitor_speed}
lib_deps = ${common.lib_deps}
[env:rhombio_l476dmw1k]
platform = ststm32
board = rhombio_l476dmw1k
framework = mbed
upload_protocol = mbed
monitor_speed = 9600
[env:leonardo]
platform = atmelavr
board = leonardo
framework = arduino
monitor_port = ${user.monitor_port}
monitor_speed = ${user.monitor_speed}
- Every master module has a section:
[env:esp32]
,[env:zeroUSB]
,[env:espressif8266]
,[env:uno]
and[env:mega]
- The
[user]
section sets a global COM port for upload and monitor in each master. - The section
[platformio]
contains the optiondefault_envs
that establishes which microcontroller you are working with. You can only flash/compile with one master at a time. It also contains the path for the data directory, where there are the HTML files for the ESP32 AP Web Server.
User configuration
At this point your IDE is ready to work with rhomb.iot. The next step is to configure rhomb.IoT to work as you want.
Continue with User Configuration File