added esp32 postman category.
This commit is contained in:
parent
f709b3250d
commit
3ca0f4950b
4 changed files with 19 additions and 6 deletions
|
|
@ -37,14 +37,14 @@ lib_deps =
|
||||||
[env:nodemcuv2]
|
[env:nodemcuv2]
|
||||||
platform = espressif8266
|
platform = espressif8266
|
||||||
board = nodemcuv2
|
board = nodemcuv2
|
||||||
lib_deps =
|
lib_deps +=
|
||||||
ESP8266WiFi
|
ESP8266WiFi
|
||||||
Servo(esp8266)
|
Servo(esp8266)
|
||||||
|
|
||||||
[env:huzzah]
|
[env:huzzah]
|
||||||
platform = espressif8266
|
platform = espressif8266
|
||||||
board = huzzah
|
board = huzzah
|
||||||
lib_deps =
|
lib_deps +=
|
||||||
ESP8266WiFi
|
ESP8266WiFi
|
||||||
Servo(esp8266)
|
Servo(esp8266)
|
||||||
|
|
||||||
|
|
@ -53,5 +53,13 @@ build_unflags = -std=gnu++11
|
||||||
build_flags = -std=gnu++14 ; AsyncTCP wants this.
|
build_flags = -std=gnu++14 ; AsyncTCP wants this.
|
||||||
platform = espressif32
|
platform = espressif32
|
||||||
board = featheresp32
|
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
|
1826@1.0.3 ; AsyncTCP
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
[platformio]
|
[platformio]
|
||||||
env_default = featheresp32
|
env_default = featheresp32
|
||||||
|
|
||||||
[common]
|
[env]
|
||||||
framework = arduino
|
framework = arduino
|
||||||
lib_deps =
|
lib_deps =
|
||||||
SPI
|
SPI
|
||||||
|
|
@ -24,12 +24,10 @@ build_unflags = -std=gnu++11
|
||||||
build_flags = -std=gnu++14 ; AsyncTCP wants this.
|
build_flags = -std=gnu++14 ; AsyncTCP wants this.
|
||||||
platform = espressif32
|
platform = espressif32
|
||||||
board = featheresp32
|
board = featheresp32
|
||||||
framework = ${common.framework}
|
|
||||||
upload_speed = 921600
|
upload_speed = 921600
|
||||||
upload_port = /dev/ttyUSB0
|
upload_port = /dev/ttyUSB0
|
||||||
lib_deps =
|
lib_deps =
|
||||||
1826@1.0.3 ; AsyncTCP
|
1826@1.0.3 ; AsyncTCP
|
||||||
${common.lib_deps}
|
|
||||||
13 ; Adafruit GFX Library
|
13 ; Adafruit GFX Library
|
||||||
22 ; Adafruit HX8357 Library
|
22 ; Adafruit HX8357 Library
|
||||||
377 ; Adafruit STMPE610
|
377 ; Adafruit STMPE610
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,7 @@ void register_nodes(){
|
||||||
registered[0xC21474D2] = NTYPE_POSTMAN;
|
registered[0xC21474D2] = NTYPE_POSTMAN;
|
||||||
registered[0xABB3B4B8] = NTYPE_POSTMAN;
|
registered[0xABB3B4B8] = NTYPE_POSTMAN;
|
||||||
registered[0x2D370A07] = NTYPE_POSTMAN;
|
registered[0x2D370A07] = NTYPE_POSTMAN;
|
||||||
|
registered[0xBFFBDD7D] = NTYPE_POSTMAN;
|
||||||
}
|
}
|
||||||
//============</registered-nodelist>===========
|
//============</registered-nodelist>===========
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -105,6 +105,8 @@
|
||||||
#define LED_PIN 2
|
#define LED_PIN 2
|
||||||
#elif defined(ARDUINO_FEATHER_ESP32) // featheresp32
|
#elif defined(ARDUINO_FEATHER_ESP32) // featheresp32
|
||||||
#define LED_PIN 13
|
#define LED_PIN 13
|
||||||
|
#elif defined(ARDUINO_NodeMCU_32S) // nodemcu-32s
|
||||||
|
#define LED_PIN 2
|
||||||
#endif
|
#endif
|
||||||
#define LED_PERIOD (1111)
|
#define LED_PERIOD (1111)
|
||||||
#define LED_ONTIME (1)
|
#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)
|
msg = msg.substring(0, POST_LENGTH); // (0) ~ (POST_LENGTH-1)
|
||||||
// send whatever letter we postmans trust other postman.
|
// send whatever letter we postmans trust other postman.
|
||||||
Wire.beginTransmission(I2C_ADDR);
|
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);
|
Wire.write(msg.c_str(), POST_LENGTH);
|
||||||
|
#endif
|
||||||
Wire.endTransmission();
|
Wire.endTransmission();
|
||||||
}
|
}
|
||||||
void changedConnectionCallback() {
|
void changedConnectionCallback() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue