From 9d01b42e328f1414488eba9629341d8e7a256539 Mon Sep 17 00:00:00 2001 From: Juergen Jung Date: Sun, 29 Jan 2017 14:41:26 +0100 Subject: [PATCH] Compatible with Arduino and PlatformIO --- .gitignore | 1 + {data => esp-wemos-schild/data}/homie/config.json | 0 {data => esp-wemos-schild/data}/homie/ui_bundle.gz | Bin .../esp-wemos-schild.ino | 2 +- platformio.ini | 9 ++++++--- 5 files changed, 8 insertions(+), 4 deletions(-) rename {data => esp-wemos-schild/data}/homie/config.json (100%) rename {data => esp-wemos-schild/data}/homie/ui_bundle.gz (100%) rename src/schild.ino => esp-wemos-schild/esp-wemos-schild.ino (99%) diff --git a/.gitignore b/.gitignore index 5dac9f5..5bcdef9 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ .piolibdeps .clang_complete .gcc-flags.json +.DS_Store diff --git a/data/homie/config.json b/esp-wemos-schild/data/homie/config.json similarity index 100% rename from data/homie/config.json rename to esp-wemos-schild/data/homie/config.json diff --git a/data/homie/ui_bundle.gz b/esp-wemos-schild/data/homie/ui_bundle.gz similarity index 100% rename from data/homie/ui_bundle.gz rename to esp-wemos-schild/data/homie/ui_bundle.gz diff --git a/src/schild.ino b/esp-wemos-schild/esp-wemos-schild.ino similarity index 99% rename from src/schild.ino rename to esp-wemos-schild/esp-wemos-schild.ino index 7909317..defa2c8 100644 --- a/src/schild.ino +++ b/esp-wemos-schild/esp-wemos-schild.ino @@ -80,7 +80,7 @@ bool onSetLength(const HomieRange& range, const String& value){ pixels.show(); int newLength = value.toInt(); if(newLength > 0){ - pixels.updateLength(newLength); + pixels.updateLength(newLength); } stripNode.setProperty("length").send(value); } diff --git a/platformio.ini b/platformio.ini index c67b50e..29c6948 100644 --- a/platformio.ini +++ b/platformio.ini @@ -9,9 +9,9 @@ ; http://docs.platformio.org/page/projectconf.html [env:d1_mini] -platform = espressif8266 -board = d1_mini -framework = arduino +platform=espressif8266 +board=d1_mini +framework=arduino ;upload_port = /dev/tty.wchusbserial410 ;upload_speed = 921600 @@ -26,3 +26,6 @@ lib_deps = ESPAsyncTCP AsyncMqttClient Adafruit NeoPixel + +[platformio] +src_dir=esp-wemos-schild