diff --git a/platformio.ini b/platformio.ini index 1f8e746..20617ec 100644 --- a/platformio.ini +++ b/platformio.ini @@ -37,14 +37,14 @@ lib_deps = [env:nodemcuv2] platform = espressif8266 board = nodemcuv2 -lib_deps = +lib_deps += ESP8266WiFi Servo(esp8266) [env:huzzah] platform = espressif8266 board = huzzah -lib_deps = +lib_deps += ESP8266WiFi Servo(esp8266) @@ -53,5 +53,13 @@ build_unflags = -std=gnu++11 build_flags = -std=gnu++14 ; AsyncTCP wants this. platform = espressif32 board = featheresp32 -lib_deps = +lib_deps += + 1826@1.0.3 ; AsyncTCP + +[env:nodemcu-32s] +build_unflags = -std=gnu++11 +build_flags = -std=gnu++14 ; AsyncTCP wants this. +platform = espressif32 +board = nodemcu-32s +lib_deps += 1826@1.0.3 ; AsyncTCP diff --git a/postman-monitor/platformio.ini b/postman-monitor/platformio.ini index 384431b..e347afa 100644 --- a/postman-monitor/platformio.ini +++ b/postman-monitor/platformio.ini @@ -11,7 +11,7 @@ [platformio] env_default = featheresp32 -[common] +[env] framework = arduino lib_deps = SPI @@ -24,12 +24,10 @@ build_unflags = -std=gnu++11 build_flags = -std=gnu++14 ; AsyncTCP wants this. platform = espressif32 board = featheresp32 -framework = ${common.framework} upload_speed = 921600 upload_port = /dev/ttyUSB0 lib_deps = 1826@1.0.3 ; AsyncTCP - ${common.lib_deps} 13 ; Adafruit GFX Library 22 ; Adafruit HX8357 Library 377 ; Adafruit STMPE610 diff --git a/postman-monitor/src/main.cpp b/postman-monitor/src/main.cpp index 2cd0700..d4f1872 100644 --- a/postman-monitor/src/main.cpp +++ b/postman-monitor/src/main.cpp @@ -54,6 +54,7 @@ void register_nodes(){ registered[0xC21474D2] = NTYPE_POSTMAN; registered[0xABB3B4B8] = NTYPE_POSTMAN; registered[0x2D370A07] = NTYPE_POSTMAN; + registered[0xBFFBDD7D] = NTYPE_POSTMAN; } //======================= diff --git a/src/main.cpp b/src/main.cpp index 190ede3..f2ab893 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -105,6 +105,8 @@ #define LED_PIN 2 #elif defined(ARDUINO_FEATHER_ESP32) // featheresp32 #define LED_PIN 13 +#elif defined(ARDUINO_NodeMCU_32S) // nodemcu-32s +#define LED_PIN 2 #endif #define LED_PERIOD (1111) #define LED_ONTIME (1) @@ -272,7 +274,11 @@ void receivedCallback(uint32_t from, String & msg) { // REQUIRED msg = msg.substring(0, POST_LENGTH); // (0) ~ (POST_LENGTH-1) // send whatever letter we postmans trust other postman. Wire.beginTransmission(I2C_ADDR); +#if defined(ARDUINO_NodeMCU_32S) + Wire.write((const uint8_t*)msg.c_str(), POST_LENGTH); +#else Wire.write(msg.c_str(), POST_LENGTH); +#endif Wire.endTransmission(); } void changedConnectionCallback() {