From ab667a1eb684bd7bd3f7de80f874e68ce6970706 Mon Sep 17 00:00:00 2001 From: Sebastian <8090259+ZwoCa@users.noreply.github.com> Date: Tue, 16 Feb 2021 23:29:42 +0100 Subject: [PATCH] Default envs (#120) * Make use of PlatformIO default_envs option Makes changing environments/platforms a breeze, no more (un-)commenting: Simply use the "Switch PlatformIO Project Environment" control in VSCode. * Updated README.md to mention ESP32 --- Microcontroller/Moppy2-Arduino/README.md | 1 + Microcontroller/Moppy2-Arduino/platformio.ini | 42 ++++++++++--------- 2 files changed, 23 insertions(+), 20 deletions(-) diff --git a/Microcontroller/Moppy2-Arduino/README.md b/Microcontroller/Moppy2-Arduino/README.md index cc84571..2bed2a1 100644 --- a/Microcontroller/Moppy2-Arduino/README.md +++ b/Microcontroller/Moppy2-Arduino/README.md @@ -2,5 +2,6 @@ Device implementation for Moppy2 for microcontrollers that support the Arduino **framework**. Currently, the following boards are officially supported: - **Arduino [Uno\*]** (via the Arduino IDE or PlatformIO) - **ESP8266** (via PlatformIO) +- **ESP32** (via PlatformIO) \* Most "Arduino" boards are extremely similar and should work fine, though if you're using PlatformIO you may need to modify `platformio.ini` to match your board-type. diff --git a/Microcontroller/Moppy2-Arduino/platformio.ini b/Microcontroller/Moppy2-Arduino/platformio.ini index 6195971..80b5e32 100644 --- a/Microcontroller/Moppy2-Arduino/platformio.ini +++ b/Microcontroller/Moppy2-Arduino/platformio.ini @@ -8,31 +8,33 @@ ; Please visit documentation for the other options and examples ; https://docs.platformio.org/page/projectconf.html -; [env:esp12e] -; platform = espressif8266 -; board = esp12e -; lib_deps= -; FastLED ; For experimental lighting effects -; https://github.com/sstaub/Ticker ; For experimental lighting effects (because lights are too slow for Timer) -; upload_speed = 115200 -; monitor_speed = 115200 +[platformio] +default_envs = uno -; [env:esp32] -; platform = espressif32 -; board = esp32dev -; lib_deps= -; FastLED ; For experimental lighting effects -; https://github.com/sstaub/Ticker ; For experimental lighting effects (because lights are too slow for Timer) -; upload_speed = 115200 -; monitor_speed = 115200 +[env] +framework = arduino [env:uno] platform = atmelavr board = uno lib_deps= - TimerOne - + TimerOne monitor_speed = 57600 -[env] -framework = arduino +[env:esp12e] +platform = espressif8266 +board = esp12e +lib_deps= + FastLED ; For experimental lighting effects + https://github.com/sstaub/Ticker ; For experimental lighting effects (because lights are too slow for Timer) +upload_speed = 115200 +monitor_speed = 115200 + +[env:esp32] +platform = espressif32 +board = esp32dev +lib_deps= + FastLED ; For experimental lighting effects + https://github.com/sstaub/Ticker ; For experimental lighting effects (because lights are too slow for Timer) +upload_speed = 115200 +monitor_speed = 115200 \ No newline at end of file