Merge pull request #5 from vahron/platformio

[platformio] Align configs with Arduino IDE
This commit is contained in:
Alex
2021-07-14 00:21:29 +03:00
committed by GitHub
7 changed files with 55 additions and 12 deletions

View File

@@ -57,7 +57,7 @@ const char WiFiPassword[] = "12345678";
// ------------ Прочее -------------
#define GL_VERSION 23 // код версии прошивки
#define EE_TOUT 30000 // таймаут сохранения епром после изменения, мс
//#define DEBUG_SERIAL // закомментируй чтобы выключить отладку (скорость 115200)
#define DEBUG_SERIAL_LAMP // закомментируй чтобы выключить отладку (скорость 115200)
#define EE_KEY 56 // ключ сброса eeprom
#define NTP_UPD_PRD 5 // период обновления времени с NTP сервера, минут
//#define SKIP_WIFI // пропустить подключение к вафле (для отладки)
@@ -139,7 +139,7 @@ byte udpScale = 0, udpBright = 0;
void setup() {
misc();
delay(2000); // ждём старта есп
#ifdef DEBUG_SERIAL
#ifdef DEBUG_SERIAL_LAMP
Serial.begin(115200);
DEBUGLN();
#endif

View File

@@ -19,7 +19,7 @@
#define MAX_PRESETS 40 // макс количество режимов
// ------------------- МАКРО --------------------
#ifdef DEBUG_SERIAL
#ifdef DEBUG_SERIAL_LAMP
#define DEBUGLN(x) Serial.println(x)
#define DEBUG(x) Serial.print(x)
#else

View File

@@ -1,3 +1,4 @@
.DS_Store
.pio
.vscode/.browse.c_cpp.db*
.vscode/c_cpp_properties.json

View File

@@ -0,0 +1,10 @@
{
"files.associations": {
"*.tcc": "cpp",
"deque": "cpp",
"list": "cpp",
"string": "cpp",
"unordered_map": "cpp",
"vector": "cpp"
}
}

View File

@@ -1,7 +0,0 @@
PIO project
pio update
pio run --target erase
pio run --target upload

View File

@@ -0,0 +1,23 @@
# PIO project
### Prerequisites:
```
pio update
```
### Update over wire:
```
pio run -e debug -t erase
pio run -e debug -t upload
pio run -e release -t upload
```
### Listen to serial monitor:
```
pio device monitor
```
### Update over local network:
```
pio run -e wireless -t upload
```

View File

@@ -8,9 +8,25 @@
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html
[env:esp8266]
[platformio]
default_envs = debug
[env]
platform = espressif8266
board = esp12e
board = d1_mini
board_build.ldscript = eagle.flash.4m2m.ld
board_build.flash_mode = dout
framework = arduino
upload_speed = 460800
monitor_speed = 115200
lib_deps = fastled/FastLED@^3.4.0
[env:release]
[env:debug]
build_type = debug
build_flags = -D DEBUG_SERIAL_LAMP
[env:wireless]
upload_protocol = espota
upload_port = 192.168.8.164