From b987c36859ea7f12b240f3f5764e6d5da9704a4f Mon Sep 17 00:00:00 2001 From: i3water <121024123@qq.com> Date: Thu, 13 Aug 2020 18:06:14 +0800 Subject: [PATCH 1/4] update codes, upgrade BLINKER NBIOT support codes. --- src/Adapters/BlinkerSerialSIM7020.h | 52 +++++++- src/Functions/BlinkerHTTPSIM7020.h | 188 ++++++++++++---------------- src/Functions/BlinkerMQTTSIM7020.h | 31 ++++- 3 files changed, 155 insertions(+), 116 deletions(-) diff --git a/src/Adapters/BlinkerSerialSIM7020.h b/src/Adapters/BlinkerSerialSIM7020.h index 9a46c878..686416b9 100644 --- a/src/Adapters/BlinkerSerialSIM7020.h +++ b/src/Adapters/BlinkerSerialSIM7020.h @@ -54,7 +54,7 @@ class BlinkerSerialSIM7020 : public BlinkerStream void flush(); // int print(const String & s, bool needCheck = true); int print(char * data, bool needCheck = true); - // int toServer(char * data); + int toServer(char * data); int bPrint(char * name, const String & data); int aliPrint(const String & data); int duerPrint(const String & data, bool report = false); @@ -154,10 +154,11 @@ int BlinkerSerialSIM7020::connect() if (!isMQTTinit) return false; // if (mqtt_NBIoT->connected()) return true; + // if (isConnect) return true; BLINKER_LOG_ALL(BLINKER_F(">>>>>> mqtt connect failed <<<<<<")); - disconnect(); + // disconnect(); // if ((millis() - latestTime) < BLINKER_MQTT_CONNECT_TIMESLOT && latestTime > 0) // { @@ -190,6 +191,8 @@ int BlinkerSerialSIM7020::connect() BLINKER_LOG(BLINKER_F("MQTT Connected!")); BLINKER_LOG_FreeHeap(); + isConnect = true; + this->latestTime = millis(); return true; @@ -221,9 +224,9 @@ void BlinkerSerialSIM7020::ping() if (!isMQTTinit) return; - if (!mqtt_NBIoT->connected()) + if (!isConnect) { - disconnect(); + // disconnect(); delay(100); @@ -246,7 +249,7 @@ void BlinkerSerialSIM7020::ping() { BLINKER_SIM7020.powerCheck(); - disconnect(); + // disconnect(); } } @@ -530,6 +533,45 @@ int BlinkerSerialSIM7020::print(char * data, bool needCheck) } } + +int BlinkerSerialSIM7020::toServer(char * data) +{ + if (!isMQTTinit) return false; + + if (!isJson(STRING_format(data))) return false; + + BLINKER_LOG_ALL(BLINKER_F("MQTT Publish to server...")); + BLINKER_LOG_FreeHeap_ALL(); + + bool _alive = isAlive; + + if (mqtt_NBIoT->connected()) + { + if (! mqtt_NBIoT->publish(BLINKER_PUB_TOPIC_NBIoT, data)) + { + BLINKER_LOG_ALL(data); + BLINKER_LOG_ALL(BLINKER_F("...Failed")); + BLINKER_LOG_FreeHeap_ALL(); + + return false; + } + else + { + BLINKER_LOG_ALL(data); + BLINKER_LOG_ALL(BLINKER_F("...OK!")); + BLINKER_LOG_FreeHeap_ALL(); + + return true; + } + } + else + { + BLINKER_ERR_LOG(BLINKER_F("MQTT Disconnected")); + isAlive = false; + return false; + } +} + int BlinkerSerialSIM7020::bPrint(char * name, const String & data) { if (!isMQTTinit) return false; diff --git a/src/Functions/BlinkerHTTPSIM7020.h b/src/Functions/BlinkerHTTPSIM7020.h index edbe419f..b34c4874 100644 --- a/src/Functions/BlinkerHTTPSIM7020.h +++ b/src/Functions/BlinkerHTTPSIM7020.h @@ -129,7 +129,7 @@ class BlinkerHTTPSIM7020 { if (available()) { - if (strcmp(streamData, BLINKER_CMD_OK) == 0) + if (strncmp(streamData, BLINKER_CMD_OK, 2) == 0) { break; } @@ -142,7 +142,7 @@ class BlinkerHTTPSIM7020 { if (available()) { - if (strcmp(streamData, BLINKER_CMD_OK) == 0) + if (strncmp(streamData, BLINKER_CMD_OK, 2) == 0) { break; } @@ -161,7 +161,8 @@ class BlinkerHTTPSIM7020 { if (available()) { - if (strcmp(streamData, BLINKER_CMD_OK) == 0) + BLINKER_LOG_ALL(BLINKER_F("sim7020_http_creat_success check")); + if (strncmp(streamData, BLINKER_CMD_OK, 2) == 0) { BLINKER_LOG_ALL(BLINKER_F("sim7020_http_creat_success")); http_status = sim7020_http_creat_success; @@ -179,7 +180,7 @@ class BlinkerHTTPSIM7020 { if (available()) { - if (strcmp(streamData, BLINKER_CMD_OK) == 0) + if (strncmp(streamData, BLINKER_CMD_OK, 2) == 0) { break; } @@ -192,7 +193,7 @@ class BlinkerHTTPSIM7020 { if (available()) { - if (strcmp(streamData, BLINKER_CMD_OK) == 0) + if (strncmp(streamData, BLINKER_CMD_OK, 2) == 0) { break; } @@ -213,7 +214,7 @@ class BlinkerHTTPSIM7020 { if (available()) { - if (strcmp(streamData, BLINKER_CMD_OK) == 0) + if (strncmp(streamData, BLINKER_CMD_OK, 2) == 0) { BLINKER_LOG_ALL(BLINKER_F("sim7020_http_con_success")); http_status = sim7020_http_con_success; @@ -231,7 +232,7 @@ class BlinkerHTTPSIM7020 { if (available()) { - if (strcmp(streamData, BLINKER_CMD_OK) == 0) + if (strncmp(streamData, BLINKER_CMD_OK, 2) == 0) { break; } @@ -244,7 +245,7 @@ class BlinkerHTTPSIM7020 { if (available()) { - if (strcmp(streamData, BLINKER_CMD_OK) == 0) + if (strncmp(streamData, BLINKER_CMD_OK, 2) == 0) { break; } @@ -265,7 +266,7 @@ class BlinkerHTTPSIM7020 { if (available()) { - if (strcmp(streamData, BLINKER_CMD_OK) == 0) + if (strncmp(streamData, BLINKER_CMD_OK, 2) == 0) { BLINKER_LOG_ALL(BLINKER_F("sim7020_http_send_success")); http_status = sim7020_http_send_success; @@ -283,7 +284,7 @@ class BlinkerHTTPSIM7020 { if (available()) { - if (strcmp(streamData, BLINKER_CMD_OK) == 0) + if (strncmp(streamData, BLINKER_CMD_OK, 2) == 0) { break; } @@ -296,7 +297,7 @@ class BlinkerHTTPSIM7020 { if (available()) { - if (strcmp(streamData, BLINKER_CMD_OK) == 0) + if (strncmp(streamData, BLINKER_CMD_OK, 2) == 0) { break; } @@ -340,7 +341,7 @@ class BlinkerHTTPSIM7020 { if (available()) { - if (strcmp(streamData, BLINKER_CMD_OK) == 0) + if (strncmp(streamData, BLINKER_CMD_OK, 2) == 0) { break; } @@ -353,7 +354,7 @@ class BlinkerHTTPSIM7020 { if (available()) { - if (strcmp(streamData, BLINKER_CMD_OK) == 0) + if (strncmp(streamData, BLINKER_CMD_OK, 2) == 0) { break; } @@ -380,17 +381,36 @@ class BlinkerHTTPSIM7020 if (_masterAT->getState() != AT_M_NONE && _masterAT->reqName() == BLINKER_CMD_CHTTPNMIC) { + // streamPrint(STRING_format(BLINKER_CMD_CHTTPDISCON_REQ) + + // "=" + STRING_format(h_id)); + + String http_data = STRING_format(streamData); + // delay(100); + time_t now_time = millis(); + while (millis() - now_time < 5000) + { + if (stream->available()) + { + http_data += stream->readStringUntil('\n').c_str(); + } + // delay(1000); + } + + // _masterAT->update(http_data); + + BLINKER_LOG_ALL(BLINKER_F("http_data: "), http_data); + BLINKER_LOG_ALL(BLINKER_F("sim7020_http_nmic_success")); http_status = sim7020_http_nmic_success; - if (strlen(strrchr(streamData, ',')) < 1024) + if (strlen(strrchr(http_data.c_str(), ',')) < 1024) { if (isFreshPayload) free(payload); isFreshPayload = true; char data_buff[1024] = { '\0' }; - memcpy(data_buff,strrchr(streamData, ',')+1, strlen(strrchr(streamData, ','))); + memcpy(data_buff,strrchr(http_data.c_str(), ',')+1, strlen(strrchr(http_data.c_str(), ','))); payload = (char*)malloc((strlen(data_buff)/2 + 1)*sizeof(char)); @@ -430,7 +450,7 @@ class BlinkerHTTPSIM7020 { if (available()) { - if (strcmp(streamData, BLINKER_CMD_OK) == 0) + if (strncmp(streamData, BLINKER_CMD_OK, 2) == 0) { break; } @@ -443,7 +463,7 @@ class BlinkerHTTPSIM7020 { if (available()) { - if (strcmp(streamData, BLINKER_CMD_OK) == 0) + if (strncmp(streamData, BLINKER_CMD_OK, 2) == 0) { break; } @@ -464,7 +484,7 @@ class BlinkerHTTPSIM7020 { if (available()) { - if (strcmp(streamData, BLINKER_CMD_OK) == 0) + if (strncmp(streamData, BLINKER_CMD_OK, 2) == 0) { BLINKER_LOG_ALL(BLINKER_F("sim7020_http_discon_success")); http_status = sim7020_http_discon_success; @@ -482,7 +502,7 @@ class BlinkerHTTPSIM7020 { if (available()) { - if (strcmp(streamData, BLINKER_CMD_OK) == 0) + if (strncmp(streamData, BLINKER_CMD_OK, 2) == 0) { break; } @@ -495,7 +515,7 @@ class BlinkerHTTPSIM7020 { if (available()) { - if (strcmp(streamData, BLINKER_CMD_OK) == 0) + if (strncmp(streamData, BLINKER_CMD_OK, 2) == 0) { break; } @@ -516,7 +536,7 @@ class BlinkerHTTPSIM7020 { if (available()) { - if (strcmp(streamData, BLINKER_CMD_OK) == 0) + if (strncmp(streamData, BLINKER_CMD_OK, 2) == 0) { BLINKER_LOG_ALL(BLINKER_F("sim7020_http_destroy_success")); http_status = sim7020_http_destroy_success; @@ -574,7 +594,7 @@ class BlinkerHTTPSIM7020 { if (available()) { - if (strcmp(streamData, BLINKER_CMD_OK) == 0) + if (strncmp(streamData, BLINKER_CMD_OK, 2) == 0) { break; } @@ -587,7 +607,7 @@ class BlinkerHTTPSIM7020 { if (available()) { - if (strcmp(streamData, BLINKER_CMD_OK) == 0) + if (strncmp(streamData, BLINKER_CMD_OK, 2) == 0) { break; } @@ -606,7 +626,7 @@ class BlinkerHTTPSIM7020 { if (available()) { - if (strcmp(streamData, BLINKER_CMD_OK) == 0) + if (strncmp(streamData, BLINKER_CMD_OK, 2) == 0) { BLINKER_LOG_ALL(BLINKER_F("sim7020_http_creat_success")); http_status = sim7020_http_creat_success; @@ -624,7 +644,7 @@ class BlinkerHTTPSIM7020 { if (available()) { - if (strcmp(streamData, BLINKER_CMD_OK) == 0) + if (strncmp(streamData, BLINKER_CMD_OK, 2) == 0) { break; } @@ -637,7 +657,7 @@ class BlinkerHTTPSIM7020 { if (available()) { - if (strcmp(streamData, BLINKER_CMD_OK) == 0) + if (strncmp(streamData, BLINKER_CMD_OK, 2) == 0) { break; } @@ -658,7 +678,7 @@ class BlinkerHTTPSIM7020 { if (available()) { - if (strcmp(streamData, BLINKER_CMD_OK) == 0) + if (strncmp(streamData, BLINKER_CMD_OK, 2) == 0) { BLINKER_LOG_ALL(BLINKER_F("sim7020_http_con_success")); http_status = sim7020_http_con_success; @@ -676,7 +696,7 @@ class BlinkerHTTPSIM7020 { if (available()) { - if (strcmp(streamData, BLINKER_CMD_OK) == 0) + if (strncmp(streamData, BLINKER_CMD_OK, 2) == 0) { break; } @@ -689,7 +709,7 @@ class BlinkerHTTPSIM7020 { if (available()) { - if (strcmp(streamData, BLINKER_CMD_OK) == 0) + if (strncmp(streamData, BLINKER_CMD_OK, 2) == 0) { break; } @@ -716,7 +736,7 @@ class BlinkerHTTPSIM7020 { if (available()) { - if (strcmp(streamData, BLINKER_CMD_OK) == 0) + if (strncmp(streamData, BLINKER_CMD_OK, 2) == 0) { BLINKER_LOG_ALL(BLINKER_F("sim7020_http_send_success")); http_status = sim7020_http_send_success; @@ -734,7 +754,7 @@ class BlinkerHTTPSIM7020 { if (available()) { - if (strcmp(streamData, BLINKER_CMD_OK) == 0) + if (strncmp(streamData, BLINKER_CMD_OK, 2) == 0) { break; } @@ -747,7 +767,7 @@ class BlinkerHTTPSIM7020 { if (available()) { - if (strcmp(streamData, BLINKER_CMD_OK) == 0) + if (strncmp(streamData, BLINKER_CMD_OK, 2) == 0) { break; } @@ -791,7 +811,7 @@ class BlinkerHTTPSIM7020 { if (available()) { - if (strcmp(streamData, BLINKER_CMD_OK) == 0) + if (strncmp(streamData, BLINKER_CMD_OK, 2) == 0) { break; } @@ -804,7 +824,7 @@ class BlinkerHTTPSIM7020 { if (available()) { - if (strcmp(streamData, BLINKER_CMD_OK) == 0) + if (strncmp(streamData, BLINKER_CMD_OK, 2) == 0) { break; } @@ -829,6 +849,21 @@ class BlinkerHTTPSIM7020 if (_masterAT->getState() != AT_M_NONE && _masterAT->reqName() == BLINKER_CMD_CHTTPNMIC) { + streamPrint(STRING_format(BLINKER_CMD_CHTTPDISCON_REQ) + + "=" + STRING_format(h_id)); + + String http_data = STRING_format(streamData); + delay(1000); + while (available()) + { + http_data += STRING_format(streamData); + delay(1000); + } + + _masterAT->update(http_data); + + BLINKER_LOG_ALL(BLINKER_F("http_data: "), http_data); + BLINKER_LOG_ALL(BLINKER_F("sim7020_http_nmic_success")); http_status = sim7020_http_nmic_success; @@ -872,7 +907,7 @@ class BlinkerHTTPSIM7020 { if (available()) { - if (strcmp(streamData, BLINKER_CMD_OK) == 0) + if (strncmp(streamData, BLINKER_CMD_OK, 2) == 0) { break; } @@ -885,7 +920,7 @@ class BlinkerHTTPSIM7020 { if (available()) { - if (strcmp(streamData, BLINKER_CMD_OK) == 0) + if (strncmp(streamData, BLINKER_CMD_OK, 2) == 0) { break; } @@ -906,7 +941,7 @@ class BlinkerHTTPSIM7020 { if (available()) { - if (strcmp(streamData, BLINKER_CMD_OK) == 0) + if (strncmp(streamData, BLINKER_CMD_OK, 2) == 0) { BLINKER_LOG_ALL(BLINKER_F("sim7020_http_discon_success")); http_status = sim7020_http_discon_success; @@ -924,7 +959,7 @@ class BlinkerHTTPSIM7020 { if (available()) { - if (strcmp(streamData, BLINKER_CMD_OK) == 0) + if (strncmp(streamData, BLINKER_CMD_OK, 2) == 0) { break; } @@ -937,7 +972,7 @@ class BlinkerHTTPSIM7020 { if (available()) { - if (strcmp(streamData, BLINKER_CMD_OK) == 0) + if (strncmp(streamData, BLINKER_CMD_OK, 2) == 0) { break; } @@ -958,7 +993,7 @@ class BlinkerHTTPSIM7020 // { // if (available()) // { - // if (strcmp(streamData, BLINKER_CMD_OK) == 0) + // if (strncmp(streamData, BLINKER_CMD_OK, 2) == 0) // { // // BLINKER_LOG_ALL(BLINKER_F("sim7020_http_destroy_success")); // // http_status = sim7020_http_destroy_success; @@ -979,7 +1014,7 @@ class BlinkerHTTPSIM7020 { if (available()) { - if (strcmp(streamData, BLINKER_CMD_OK) == 0) + if (strncmp(streamData, BLINKER_CMD_OK, 2) == 0) { BLINKER_LOG_ALL(BLINKER_F("sim7020_http_destroy_success")); http_status = sim7020_http_destroy_success; @@ -1137,6 +1172,7 @@ class BlinkerHTTPSIM7020 memset(_data, '\0', 1024); } yield(); + // delay(100); } return false; @@ -1167,8 +1203,9 @@ class BlinkerHTTPSIM7020 { // strcpy(_data, stream->readStringUntil('\n').c_str()); String _data = stream->readStringUntil('\n'); + // if ( _data[_data.length() - 1] == '\n') + // _data[_data.length() - 1] = '\0'; BLINKER_LOG_ALL(BLINKER_F("handleSerial rs: "), _data); - // _data[strlen(_data) - 1] = '\0'; if (isFresh) { free(streamData); @@ -1179,74 +1216,9 @@ class BlinkerHTTPSIM7020 streamData = (char*)malloc((_data.length() + 1)*sizeof(char)); strcpy(streamData, _data.c_str()); - if (_data.length() > 0) streamData[_data.length() - 1] = '\0'; + if (_data.length() > 0) streamData[_data.length()] = '\0'; isFresh = true; return true; - - // if (isFresh) - // { - // memset(streamData, '\0', BLINKER_HTTP_SIM7020_DATA_BUFFER_SIZE);//free(streamData); - // } - // else - // { - // streamData = (char*)malloc(BLINKER_HTTP_SIM7020_DATA_BUFFER_SIZE*sizeof(char)); - // memset(streamData, '\0', BLINKER_HTTP_SIM7020_DATA_BUFFER_SIZE); - // } - // streamData = ""; - - // memset(streamData, '\0', 1024); - - // BLINKER_LOG_ALL(BLINKER_F("handleSerial rs: "), stream->readString()); - - // strcpy(streamData, stream->readStringUntil('\n').c_str()); - - // int16_t dNum = strlen(streamData); - - // BLINKER_LOG_ALL(BLINKER_F("handleSerial rs: "), streamData, - // BLINKER_F(", dNum: "), dNum); - - // int16_t dNum = 0; - // int c_d = timedRead(); - // while (dNum < BLINKER_MAX_READ_SIZE && c_d >=0 && c_d != '\n') - // { - // // if (c_d != '\r') - // // { - // streamData[dNum] = (char)c_d; - // dNum++; - // // streamData = (char*)realloc(streamData, (dNum+1)*sizeof(char)); - // // } - - // c_d = timedRead(); - // } - // // // dNum++; - // // // // streamData = (char*)realloc(streamData, dNum*sizeof(char)); - - // // // streamData[dNum-1] = '\0'; - - // // // strcpy(streamData, stream->readStringUntil('\n').c_str()); - // // // int16_t dNum = strlen(streamData); - // // // streamData[dNum-1] = '\0'; - - // // // stream->flush(); - - // // // BLINKER_LOG_ALL(BLINKER_F("handleSerial: "), streamData, - // // // BLINKER_F(" , dNum: "), dNum); - // // // BLINKER_LOG_FreeHeap_ALL(); - - // if (dNum < BLINKER_MAX_READ_SIZE && dNum > 0) - // { - // // if (streamData[dNum - 1] == '\r') - // streamData[dNum - 1] = '\0'; - // BLINKER_LOG_ALL(BLINKER_F("handleSerial: "), streamData); - // BLINKER_LOG_ALL(BLINKER_F("dNum: "), dNum); - - // isFresh = true; - // return true; - // } - // else - // { - // return false; - // } } else { diff --git a/src/Functions/BlinkerMQTTSIM7020.h b/src/Functions/BlinkerMQTTSIM7020.h index 805d2697..1c917486 100644 --- a/src/Functions/BlinkerMQTTSIM7020.h +++ b/src/Functions/BlinkerMQTTSIM7020.h @@ -378,14 +378,28 @@ int BlinkerMQTTSIM7020::readSubscription(uint16_t time_out) if (_masterAT->getState() != AT_M_NONE && _masterAT->reqName() == BLINKER_CMD_CMQPUB) { - String subData = String(streamData).substring( + String _Data = STRING_format(streamData); + + time_t now_time = millis(); + while (millis() - now_time < 1500) + { + if (stream->available()) + { + _Data += stream->readStringUntil('\n').c_str(); + } + // delay(1000); + } + BLINKER_LOG_ALL(BLINKER_F("_Data: "), _Data); + + String subData = _Data.substring( _masterAT->getParam(0).length() + _masterAT->getParam(1).length() + _masterAT->getParam(2).length() + _masterAT->getParam(3).length() + _masterAT->getParam(4).length() + _masterAT->getParam(5).length() + - 15, strlen(streamData) - 1); + 15, _Data.length() - 1); + // BLINKER_LOG_ALL(BLINKER_F("leng 0: "), _masterAT->getParam(0).length()); // BLINKER_LOG_ALL(BLINKER_F("leng 1: "), _masterAT->getParam(1).length()); // BLINKER_LOG_ALL(BLINKER_F("leng 2: "), _masterAT->getParam(2).length()); @@ -458,6 +472,17 @@ bool BlinkerMQTTSIM7020::streamAvailable() { // strcpy(_data, stream->readStringUntil('\n').c_str()); String _data = stream->readStringUntil('\n'); + + // time_t now_time = millis(); + // while (millis() - now_time < 1500) + // { + // if (stream->available()) + // { + // _data += stream->readStringUntil('\n').c_str(); + // } + // // delay(1000); + // } + BLINKER_LOG_ALL(BLINKER_F("handleSerial rs: "), _data); BLINKER_LOG_ALL("len: ", _data.length()); // _data[strlen(_data) - 1] = '\0'; @@ -474,7 +499,7 @@ bool BlinkerMQTTSIM7020::streamAvailable() streamData = (char*)malloc((_data.length() + 1)*sizeof(char)); strcpy(streamData, _data.c_str()); - if (_data.length() > 0) streamData[_data.length() - 1] = '\0'; + if (streamData[_data.length() - 1] == '\r') streamData[_data.length() - 1] = '\0'; isFresh = true; return true; // if (isFresh) free(streamData); From 5ec0a2e672991bf9882c28226f7907ab79ad4863 Mon Sep 17 00:00:00 2001 From: i3water <121024123@qq.com> Date: Mon, 17 Aug 2020 18:59:33 +0800 Subject: [PATCH 2/4] update codes, upgrade BLINKER NBIOT QRCODE support codes --- examples/Blinker_AHRS/AHRS_BLE/AHRS_BLE.ino | 8 +- examples/Blinker_AHRS/AHRS_WiFi/AHRS_WiFi.ino | 8 +- .../APCONFIG_WiFi/APCONFIG_WiFi.ino | 8 +- .../AT_Firmware_WiFi/AT_Firmware_WiFi.ino | 8 +- examples/Blinker_AUTO/AUTO_Pro/AUTO_Pro.ino | 8 +- examples/Blinker_AUTO/AUTO_WiFi/AUTO_WiFi.ino | 8 +- .../AliGenie_LIGHT/AliGenie_LIGHT.ino | 8 +- .../AliGenie_MULTI_OUTLET.ino | 8 +- .../AliGenie_OUTLET/AliGenie_OUTLET.ino | 8 +- .../AliGenie_SENSOR/AliGenie_SENSOR.ino | 8 +- .../ArduinoJson_WiFi/ArduinoJson_WiFi.ino | 8 +- .../BMP180_WiFi/BMP180_WiFi.ino | 8 +- .../Bridge_WiFi/Bridge_WiFi.ino | 8 +- .../Blinker_Button/Button_BLE/Button_BLE.ino | 8 +- .../Button_WiFi/Button_WiFi.ino | 8 +- .../CLOUDCONFIG_WiFi/CLOUDCONFIG_WiFi.ino | 8 +- .../CLOUDDATA_WiFi/CLOUDDATA_WiFi.ino | 8 +- examples/Blinker_DHT/DHT_BLE/DHT_BLE.ino | 8 +- examples/Blinker_DHT/DHT_WiFi/DHT_WiFi.ino | 8 +- .../Blinker_JsonData/Blinker_JsonData.ino | 8 +- .../Blinker_TextData/Blinker_TextData.ino | 8 +- .../Blinker_TimeSlotData.ino | 8 +- .../DuerOS_LIGHT/DuerOS_LIGHT.ino | 8 +- .../DuerOS_MULTI_OUTLET.ino | 8 +- .../DuerOS_OUTLET/DuerOS_OUTLET.ino | 8 +- .../DuerOS_SENSOR/DuerOS_SENSOR.ino | 8 +- .../Blinker_ESP32_CAM/Blinker_ESP32_CAM.ino | 14 +- .../ESPTOUCH_WiFi/ESPTOUCH_WiFi.ino | 8 +- .../Blinker_Event/Event_Error/Event_Error.ino | 8 +- .../Event_Message/Event_Message.ino | 8 +- .../Event_Warning/Event_Warning.ino | 8 +- .../EventData_WiFi/EventData_WiFi.ino | 8 +- examples/Blinker_GPRS/GPRS_LUAT/GPRS_LUAT.ino | 8 +- examples/Blinker_GPS/GPS_BLE/GPS_BLE.ino | 8 +- examples/Blinker_GPS/GPS_WiFi/GPS_WiFi.ino | 8 +- .../GPSData_WiFi/GPSData_WiFi.ino | 8 +- .../Gateway_WiFi/Gateway_WiFi.ino | 8 +- .../Heartbeat_BLE/Heartbeat_BLE.ino | 8 +- .../Heartbeat_WiFi/Heartbeat_WiFi.ino | 8 +- .../Blinker_Hello/Hello_BLE/Hello_BLE.ino | 8 +- .../Blinker_Hello/Hello_WiFi/Hello_WiFi.ino | 14 +- .../Joystick_BLE/Joystick_BLE.ino | 8 +- .../LowPower_GPRS/LowPower_GPRS.ino | 8 +- .../LowPower_WiFi/LowPower_WiFi.ino | 8 +- .../Blinker_MIOT/MIOT_LIGHT/MIOT_LIGHT.ino | 8 +- .../MIOT_MULTI_OUTLET/MIOT_MULTI_OUTLET.ino | 8 +- .../Blinker_MIOT/MIOT_OUTLET/MIOT_OUTLET.ino | 8 +- .../Blinker_MIOT/MIOT_SENSOR/MIOT_SENSOR.ino | 8 +- .../NBIoT_SIM7020/NBIoT_SIM7020.ino | 8 +- .../Blinker_Notify/Notify_BLE/Notify_BLE.ino | 8 +- .../Notify_WiFi/Notify_WiFi.ino | 8 +- .../Blinker_Number/Number_BLE/Number_BLE.ino | 8 +- .../Number_WiFi/Number_WiFi.ino | 8 +- examples/Blinker_OTA/OTA_WiFi/OTA_WiFi.ino | 8 +- .../Blinker_PRO_AIR202/Blinker_PRO_AIR202.ino | 8 +- .../Blinker_Pro_Change_Server.ino | 8 +- .../Blinker_PRO_ESP/Blinker_PRO_ESP.ino | 8 +- .../Blinker_PRO_ESP_APCONFIG.ino | 8 +- .../Blinker_PRO_SIM7020.ino | 8 +- .../Blinker_PRO_Plug/Blinker_PRO_Plug.ino | 8 +- .../Blinker_PRO_Wlan_Config.ino | 8 +- examples/Blinker_PUSH/PUSH_WiFi/PUSH_WiFi.ino | 8 +- .../Blinker_Print/Print_BLE/Print_BLE.ino | 8 +- .../Blinker_Print/Print_WiFi/Print_WiFi.ino | 8 +- .../Blinker_QRCode_NBIoT.ino | 87 ++++++++ examples/Blinker_RGB/RGB_BLE/RGB_BLE.ino | 8 +- examples/Blinker_RGB/RGB_WiFi/RGB_WiFi.ino | 8 +- examples/Blinker_SMS/SMS_WiFi/SMS_WiFi.ino | 8 +- .../Blinker_Slider/Slider_BLE/Slider_BLE.ino | 8 +- .../Slider_WiFi/Slider_WiFi.ino | 8 +- .../SubDevice_WiFi/SubDevice_WiFi.ino | 8 +- .../Summary_WiFi/Summary_WiFi.ino | 8 +- .../Blinker_Switch/Switch_BLE/Switch_BLE.ino | 8 +- .../Switch_WiFi/Switch_WiFi.ino | 8 +- examples/Blinker_TASK/TASK_BLE/TASK_BLE.ino | 8 +- examples/Blinker_TASK/TASK_WiFi/TASK_WiFi.ino | 8 +- examples/Blinker_TEXT/TEXT_BLE/TEXT_BLE.ino | 8 +- examples/Blinker_TEXT/TEXT_WiFi/TEXT_WiFi.ino | 8 +- examples/Blinker_Tab/Tab_WiFi/Tab_WiFi.ino | 8 +- .../Blinker_Ticker/Ticker_BLE/Ticker_BLE.ino | 8 +- examples/Blinker_Time/Time_WiFi/Time_WiFi.ino | 8 +- .../WECHAT_WiFi/WECHAT_WiFi.ino | 8 +- .../Blinker_WS2812/WS2812_BLE/WS2812_BLE.ino | 8 +- .../WS2812_WiFi/WS2812_WiFi.ino | 8 +- .../Weather_WiFi/Weather_WiFi.ino | 8 +- keywords.txt | 1 + src/Adapters/BlinkerSerialSIM7020.h | 15 +- src/Blinker.h | 6 + src/Blinker/BlinkerApi.h | 195 +++++++++++------- src/Blinker/BlinkerApiBase.h | 3 +- src/Blinker/BlinkerAuto.h | 3 +- src/Blinker/BlinkerConfig.h | 14 +- src/Blinker/BlinkerProtocol.h | 24 ++- src/Blinker/BlinkerStream.h | 21 +- src/Blinker/BlinkerUtility.h | 2 +- src/Functions/BlinkerHTTPSIM7020.h | 2 +- src/Functions/BlinkerMQTTSIM7020.h | 6 +- src/modules/TaskScheduler/TaskScheduler.h | 2 +- 98 files changed, 620 insertions(+), 445 deletions(-) create mode 100644 examples/Blinker_QRCode_NBIoT/Blinker_QRCode_NBIoT.ino diff --git a/examples/Blinker_AHRS/AHRS_BLE/AHRS_BLE.ino b/examples/Blinker_AHRS/AHRS_BLE/AHRS_BLE.ino index 555dc23b..fbda2f9c 100644 --- a/examples/Blinker_AHRS/AHRS_BLE/AHRS_BLE.ino +++ b/examples/Blinker_AHRS/AHRS_BLE/AHRS_BLE.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_AHRS/AHRS_WiFi/AHRS_WiFi.ino b/examples/Blinker_AHRS/AHRS_WiFi/AHRS_WiFi.ino index aafd25bd..0a99fee4 100644 --- a/examples/Blinker_AHRS/AHRS_WiFi/AHRS_WiFi.ino +++ b/examples/Blinker_AHRS/AHRS_WiFi/AHRS_WiFi.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_APCONFIG/APCONFIG_WiFi/APCONFIG_WiFi.ino b/examples/Blinker_APCONFIG/APCONFIG_WiFi/APCONFIG_WiFi.ino index a3a3625d..6a453666 100644 --- a/examples/Blinker_APCONFIG/APCONFIG_WiFi/APCONFIG_WiFi.ino +++ b/examples/Blinker_APCONFIG/APCONFIG_WiFi/APCONFIG_WiFi.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_AT_Firmware/AT_Firmware_WiFi/AT_Firmware_WiFi.ino b/examples/Blinker_AT_Firmware/AT_Firmware_WiFi/AT_Firmware_WiFi.ino index 9bf35f9b..841c0899 100644 --- a/examples/Blinker_AT_Firmware/AT_Firmware_WiFi/AT_Firmware_WiFi.ino +++ b/examples/Blinker_AT_Firmware/AT_Firmware_WiFi/AT_Firmware_WiFi.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_AUTO/AUTO_Pro/AUTO_Pro.ino b/examples/Blinker_AUTO/AUTO_Pro/AUTO_Pro.ino index f188654d..4e6151ec 100644 --- a/examples/Blinker_AUTO/AUTO_Pro/AUTO_Pro.ino +++ b/examples/Blinker_AUTO/AUTO_Pro/AUTO_Pro.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_AUTO/AUTO_WiFi/AUTO_WiFi.ino b/examples/Blinker_AUTO/AUTO_WiFi/AUTO_WiFi.ino index 8e63a9a6..ac910d78 100644 --- a/examples/Blinker_AUTO/AUTO_WiFi/AUTO_WiFi.ino +++ b/examples/Blinker_AUTO/AUTO_WiFi/AUTO_WiFi.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_AliGenie/AliGenie_LIGHT/AliGenie_LIGHT.ino b/examples/Blinker_AliGenie/AliGenie_LIGHT/AliGenie_LIGHT.ino index 6c1d9c24..edfa56d6 100644 --- a/examples/Blinker_AliGenie/AliGenie_LIGHT/AliGenie_LIGHT.ino +++ b/examples/Blinker_AliGenie/AliGenie_LIGHT/AliGenie_LIGHT.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_AliGenie/AliGenie_MULTI_OUTLET/AliGenie_MULTI_OUTLET.ino b/examples/Blinker_AliGenie/AliGenie_MULTI_OUTLET/AliGenie_MULTI_OUTLET.ino index e5b5b852..664ad36f 100644 --- a/examples/Blinker_AliGenie/AliGenie_MULTI_OUTLET/AliGenie_MULTI_OUTLET.ino +++ b/examples/Blinker_AliGenie/AliGenie_MULTI_OUTLET/AliGenie_MULTI_OUTLET.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_AliGenie/AliGenie_OUTLET/AliGenie_OUTLET.ino b/examples/Blinker_AliGenie/AliGenie_OUTLET/AliGenie_OUTLET.ino index cec04bd4..3adbd35d 100644 --- a/examples/Blinker_AliGenie/AliGenie_OUTLET/AliGenie_OUTLET.ino +++ b/examples/Blinker_AliGenie/AliGenie_OUTLET/AliGenie_OUTLET.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_AliGenie/AliGenie_SENSOR/AliGenie_SENSOR.ino b/examples/Blinker_AliGenie/AliGenie_SENSOR/AliGenie_SENSOR.ino index e8dc47c6..f6ca4500 100644 --- a/examples/Blinker_AliGenie/AliGenie_SENSOR/AliGenie_SENSOR.ino +++ b/examples/Blinker_AliGenie/AliGenie_SENSOR/AliGenie_SENSOR.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_ArduinoJson/ArduinoJson_WiFi/ArduinoJson_WiFi.ino b/examples/Blinker_ArduinoJson/ArduinoJson_WiFi/ArduinoJson_WiFi.ino index b958d226..0c58c6c8 100644 --- a/examples/Blinker_ArduinoJson/ArduinoJson_WiFi/ArduinoJson_WiFi.ino +++ b/examples/Blinker_ArduinoJson/ArduinoJson_WiFi/ArduinoJson_WiFi.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_BMP180/BMP180_WiFi/BMP180_WiFi.ino b/examples/Blinker_BMP180/BMP180_WiFi/BMP180_WiFi.ino index 2c8c9a0e..81e5b893 100644 --- a/examples/Blinker_BMP180/BMP180_WiFi/BMP180_WiFi.ino +++ b/examples/Blinker_BMP180/BMP180_WiFi/BMP180_WiFi.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_Bridge/Bridge_WiFi/Bridge_WiFi.ino b/examples/Blinker_Bridge/Bridge_WiFi/Bridge_WiFi.ino index fc127072..9e18b3ef 100644 --- a/examples/Blinker_Bridge/Bridge_WiFi/Bridge_WiFi.ino +++ b/examples/Blinker_Bridge/Bridge_WiFi/Bridge_WiFi.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_Button/Button_BLE/Button_BLE.ino b/examples/Blinker_Button/Button_BLE/Button_BLE.ino index 95efaab1..aa0c9a5d 100644 --- a/examples/Blinker_Button/Button_BLE/Button_BLE.ino +++ b/examples/Blinker_Button/Button_BLE/Button_BLE.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_Button/Button_WiFi/Button_WiFi.ino b/examples/Blinker_Button/Button_WiFi/Button_WiFi.ino index 4d166a18..073226b5 100644 --- a/examples/Blinker_Button/Button_WiFi/Button_WiFi.ino +++ b/examples/Blinker_Button/Button_WiFi/Button_WiFi.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_CLOUDCONFIG/CLOUDCONFIG_WiFi/CLOUDCONFIG_WiFi.ino b/examples/Blinker_CLOUDCONFIG/CLOUDCONFIG_WiFi/CLOUDCONFIG_WiFi.ino index 76939e22..da58b99e 100644 --- a/examples/Blinker_CLOUDCONFIG/CLOUDCONFIG_WiFi/CLOUDCONFIG_WiFi.ino +++ b/examples/Blinker_CLOUDCONFIG/CLOUDCONFIG_WiFi/CLOUDCONFIG_WiFi.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_CLOUDDATA/CLOUDDATA_WiFi/CLOUDDATA_WiFi.ino b/examples/Blinker_CLOUDDATA/CLOUDDATA_WiFi/CLOUDDATA_WiFi.ino index 2ba670da..3567376f 100644 --- a/examples/Blinker_CLOUDDATA/CLOUDDATA_WiFi/CLOUDDATA_WiFi.ino +++ b/examples/Blinker_CLOUDDATA/CLOUDDATA_WiFi/CLOUDDATA_WiFi.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_DHT/DHT_BLE/DHT_BLE.ino b/examples/Blinker_DHT/DHT_BLE/DHT_BLE.ino index 68a629b5..0eeae613 100644 --- a/examples/Blinker_DHT/DHT_BLE/DHT_BLE.ino +++ b/examples/Blinker_DHT/DHT_BLE/DHT_BLE.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_DHT/DHT_WiFi/DHT_WiFi.ino b/examples/Blinker_DHT/DHT_WiFi/DHT_WiFi.ino index 4333f7bf..8ac9c784 100644 --- a/examples/Blinker_DHT/DHT_WiFi/DHT_WiFi.ino +++ b/examples/Blinker_DHT/DHT_WiFi/DHT_WiFi.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_DataStorage/Blinker_JsonData/Blinker_JsonData.ino b/examples/Blinker_DataStorage/Blinker_JsonData/Blinker_JsonData.ino index c510bfc3..5b48c053 100644 --- a/examples/Blinker_DataStorage/Blinker_JsonData/Blinker_JsonData.ino +++ b/examples/Blinker_DataStorage/Blinker_JsonData/Blinker_JsonData.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_DataStorage/Blinker_TextData/Blinker_TextData.ino b/examples/Blinker_DataStorage/Blinker_TextData/Blinker_TextData.ino index 9cf8e029..57536dd4 100644 --- a/examples/Blinker_DataStorage/Blinker_TextData/Blinker_TextData.ino +++ b/examples/Blinker_DataStorage/Blinker_TextData/Blinker_TextData.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_DataStorage/Blinker_TimeSlotData/Blinker_TimeSlotData.ino b/examples/Blinker_DataStorage/Blinker_TimeSlotData/Blinker_TimeSlotData.ino index 0064a15c..4ae8705e 100644 --- a/examples/Blinker_DataStorage/Blinker_TimeSlotData/Blinker_TimeSlotData.ino +++ b/examples/Blinker_DataStorage/Blinker_TimeSlotData/Blinker_TimeSlotData.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_DuerOS/DuerOS_LIGHT/DuerOS_LIGHT.ino b/examples/Blinker_DuerOS/DuerOS_LIGHT/DuerOS_LIGHT.ino index e7a14ea5..0a38daa8 100644 --- a/examples/Blinker_DuerOS/DuerOS_LIGHT/DuerOS_LIGHT.ino +++ b/examples/Blinker_DuerOS/DuerOS_LIGHT/DuerOS_LIGHT.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_DuerOS/DuerOS_MULTI_OUTLET/DuerOS_MULTI_OUTLET.ino b/examples/Blinker_DuerOS/DuerOS_MULTI_OUTLET/DuerOS_MULTI_OUTLET.ino index de4f2b33..21c40ea5 100644 --- a/examples/Blinker_DuerOS/DuerOS_MULTI_OUTLET/DuerOS_MULTI_OUTLET.ino +++ b/examples/Blinker_DuerOS/DuerOS_MULTI_OUTLET/DuerOS_MULTI_OUTLET.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_DuerOS/DuerOS_OUTLET/DuerOS_OUTLET.ino b/examples/Blinker_DuerOS/DuerOS_OUTLET/DuerOS_OUTLET.ino index 0eb8bcff..7d613775 100644 --- a/examples/Blinker_DuerOS/DuerOS_OUTLET/DuerOS_OUTLET.ino +++ b/examples/Blinker_DuerOS/DuerOS_OUTLET/DuerOS_OUTLET.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_DuerOS/DuerOS_SENSOR/DuerOS_SENSOR.ino b/examples/Blinker_DuerOS/DuerOS_SENSOR/DuerOS_SENSOR.ino index a2dae58f..6447d9ef 100644 --- a/examples/Blinker_DuerOS/DuerOS_SENSOR/DuerOS_SENSOR.ino +++ b/examples/Blinker_DuerOS/DuerOS_SENSOR/DuerOS_SENSOR.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_ESP32_CAM/Blinker_ESP32_CAM.ino b/examples/Blinker_ESP32_CAM/Blinker_ESP32_CAM.ino index 749d0a98..1279c592 100644 --- a/examples/Blinker_ESP32_CAM/Blinker_ESP32_CAM.ino +++ b/examples/Blinker_ESP32_CAM/Blinker_ESP32_CAM.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc @@ -60,7 +60,7 @@ void dataRead(const String & data) uint32_t BlinkerTime = millis(); - Blinker.printObject("video", "{\"str\":\"mjpg\",\"url\":\"http:"+ String(WiFi.localIP()) + "\"}"); + Blinker.print("millis", BlinkerTime); } void setup() @@ -84,6 +84,6 @@ void loop() setupCamera(); setup_camera = true; - Blinker.printObject("video", "{\"str\":\"mjpg\",\"url\":\"http:"+ String(WiFi.localIP()) + "\"}"); + Blinker.printObject("video", "{\"str\":\"mjpg\",\"url\":\"http:"+ String(WiFi.localIP()) + "\"}") } -} \ No newline at end of file +} diff --git a/examples/Blinker_ESPTOUCH/ESPTOUCH_WiFi/ESPTOUCH_WiFi.ino b/examples/Blinker_ESPTOUCH/ESPTOUCH_WiFi/ESPTOUCH_WiFi.ino index 38c1434d..9ebb42cb 100644 --- a/examples/Blinker_ESPTOUCH/ESPTOUCH_WiFi/ESPTOUCH_WiFi.ino +++ b/examples/Blinker_ESPTOUCH/ESPTOUCH_WiFi/ESPTOUCH_WiFi.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_Event/Event_Error/Event_Error.ino b/examples/Blinker_Event/Event_Error/Event_Error.ino index 7cf893c4..bb504e3b 100644 --- a/examples/Blinker_Event/Event_Error/Event_Error.ino +++ b/examples/Blinker_Event/Event_Error/Event_Error.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_Event/Event_Message/Event_Message.ino b/examples/Blinker_Event/Event_Message/Event_Message.ino index 5486e8d1..46f52ab9 100644 --- a/examples/Blinker_Event/Event_Message/Event_Message.ino +++ b/examples/Blinker_Event/Event_Message/Event_Message.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_Event/Event_Warning/Event_Warning.ino b/examples/Blinker_Event/Event_Warning/Event_Warning.ino index 7cf893c4..bb504e3b 100644 --- a/examples/Blinker_Event/Event_Warning/Event_Warning.ino +++ b/examples/Blinker_Event/Event_Warning/Event_Warning.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_EventData/EventData_WiFi/EventData_WiFi.ino b/examples/Blinker_EventData/EventData_WiFi/EventData_WiFi.ino index 253a5ccf..cae88e64 100644 --- a/examples/Blinker_EventData/EventData_WiFi/EventData_WiFi.ino +++ b/examples/Blinker_EventData/EventData_WiFi/EventData_WiFi.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_GPRS/GPRS_LUAT/GPRS_LUAT.ino b/examples/Blinker_GPRS/GPRS_LUAT/GPRS_LUAT.ino index 0ccc64fa..f1297fb6 100644 --- a/examples/Blinker_GPRS/GPRS_LUAT/GPRS_LUAT.ino +++ b/examples/Blinker_GPRS/GPRS_LUAT/GPRS_LUAT.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_GPS/GPS_BLE/GPS_BLE.ino b/examples/Blinker_GPS/GPS_BLE/GPS_BLE.ino index a5b5b0c2..195c62e5 100644 --- a/examples/Blinker_GPS/GPS_BLE/GPS_BLE.ino +++ b/examples/Blinker_GPS/GPS_BLE/GPS_BLE.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_GPS/GPS_WiFi/GPS_WiFi.ino b/examples/Blinker_GPS/GPS_WiFi/GPS_WiFi.ino index 8397b357..8d2a35a9 100644 --- a/examples/Blinker_GPS/GPS_WiFi/GPS_WiFi.ino +++ b/examples/Blinker_GPS/GPS_WiFi/GPS_WiFi.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_GPSData/GPSData_WiFi/GPSData_WiFi.ino b/examples/Blinker_GPSData/GPSData_WiFi/GPSData_WiFi.ino index b122cc2c..7fe5d350 100644 --- a/examples/Blinker_GPSData/GPSData_WiFi/GPSData_WiFi.ino +++ b/examples/Blinker_GPSData/GPSData_WiFi/GPSData_WiFi.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_Gateway/Gateway_WiFi/Gateway_WiFi.ino b/examples/Blinker_Gateway/Gateway_WiFi/Gateway_WiFi.ino index 1b0abbfa..1d5a5674 100644 --- a/examples/Blinker_Gateway/Gateway_WiFi/Gateway_WiFi.ino +++ b/examples/Blinker_Gateway/Gateway_WiFi/Gateway_WiFi.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_Heartbeat/Heartbeat_BLE/Heartbeat_BLE.ino b/examples/Blinker_Heartbeat/Heartbeat_BLE/Heartbeat_BLE.ino index 1ba63062..0c50e1c5 100644 --- a/examples/Blinker_Heartbeat/Heartbeat_BLE/Heartbeat_BLE.ino +++ b/examples/Blinker_Heartbeat/Heartbeat_BLE/Heartbeat_BLE.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_Heartbeat/Heartbeat_WiFi/Heartbeat_WiFi.ino b/examples/Blinker_Heartbeat/Heartbeat_WiFi/Heartbeat_WiFi.ino index 268a97cb..e3cf2978 100644 --- a/examples/Blinker_Heartbeat/Heartbeat_WiFi/Heartbeat_WiFi.ino +++ b/examples/Blinker_Heartbeat/Heartbeat_WiFi/Heartbeat_WiFi.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_Hello/Hello_BLE/Hello_BLE.ino b/examples/Blinker_Hello/Hello_BLE/Hello_BLE.ino index bd3bdf58..fb760c0a 100644 --- a/examples/Blinker_Hello/Hello_BLE/Hello_BLE.ino +++ b/examples/Blinker_Hello/Hello_BLE/Hello_BLE.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_Hello/Hello_WiFi/Hello_WiFi.ino b/examples/Blinker_Hello/Hello_WiFi/Hello_WiFi.ino index 379fd061..6147d99a 100644 --- a/examples/Blinker_Hello/Hello_WiFi/Hello_WiFi.ino +++ b/examples/Blinker_Hello/Hello_WiFi/Hello_WiFi.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc @@ -47,9 +47,9 @@ #include -char auth[] = "Your Device Secret Key"; -char ssid[] = "Your WiFi network SSID or name"; -char pswd[] = "Your WiFi network WPA password or WEP key"; +char auth[] = "6650efab7f0a"; +char ssid[] = "有没有wifi"; +char pswd[] = "i8888888"; // 新建组件对象 BlinkerButton Button1("btn-abc"); diff --git a/examples/Blinker_Joystick/Joystick_BLE/Joystick_BLE.ino b/examples/Blinker_Joystick/Joystick_BLE/Joystick_BLE.ino index d23edfd9..1ebe301b 100644 --- a/examples/Blinker_Joystick/Joystick_BLE/Joystick_BLE.ino +++ b/examples/Blinker_Joystick/Joystick_BLE/Joystick_BLE.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_LowPower/LowPower_GPRS/LowPower_GPRS.ino b/examples/Blinker_LowPower/LowPower_GPRS/LowPower_GPRS.ino index 9ca07826..55e1b70f 100644 --- a/examples/Blinker_LowPower/LowPower_GPRS/LowPower_GPRS.ino +++ b/examples/Blinker_LowPower/LowPower_GPRS/LowPower_GPRS.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_LowPower/LowPower_WiFi/LowPower_WiFi.ino b/examples/Blinker_LowPower/LowPower_WiFi/LowPower_WiFi.ino index fb5a4d08..d186481f 100644 --- a/examples/Blinker_LowPower/LowPower_WiFi/LowPower_WiFi.ino +++ b/examples/Blinker_LowPower/LowPower_WiFi/LowPower_WiFi.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_MIOT/MIOT_LIGHT/MIOT_LIGHT.ino b/examples/Blinker_MIOT/MIOT_LIGHT/MIOT_LIGHT.ino index 7ee67fd7..9ab97331 100644 --- a/examples/Blinker_MIOT/MIOT_LIGHT/MIOT_LIGHT.ino +++ b/examples/Blinker_MIOT/MIOT_LIGHT/MIOT_LIGHT.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_MIOT/MIOT_MULTI_OUTLET/MIOT_MULTI_OUTLET.ino b/examples/Blinker_MIOT/MIOT_MULTI_OUTLET/MIOT_MULTI_OUTLET.ino index 314e0aba..3f47a14d 100644 --- a/examples/Blinker_MIOT/MIOT_MULTI_OUTLET/MIOT_MULTI_OUTLET.ino +++ b/examples/Blinker_MIOT/MIOT_MULTI_OUTLET/MIOT_MULTI_OUTLET.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_MIOT/MIOT_OUTLET/MIOT_OUTLET.ino b/examples/Blinker_MIOT/MIOT_OUTLET/MIOT_OUTLET.ino index 4f5fd0fc..627a47ba 100644 --- a/examples/Blinker_MIOT/MIOT_OUTLET/MIOT_OUTLET.ino +++ b/examples/Blinker_MIOT/MIOT_OUTLET/MIOT_OUTLET.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_MIOT/MIOT_SENSOR/MIOT_SENSOR.ino b/examples/Blinker_MIOT/MIOT_SENSOR/MIOT_SENSOR.ino index 8761d00e..16e1074a 100644 --- a/examples/Blinker_MIOT/MIOT_SENSOR/MIOT_SENSOR.ino +++ b/examples/Blinker_MIOT/MIOT_SENSOR/MIOT_SENSOR.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_NBIOT/NBIoT_SIM7020/NBIoT_SIM7020.ino b/examples/Blinker_NBIOT/NBIoT_SIM7020/NBIoT_SIM7020.ino index 8edbc26a..b0f325dd 100644 --- a/examples/Blinker_NBIOT/NBIoT_SIM7020/NBIoT_SIM7020.ino +++ b/examples/Blinker_NBIOT/NBIoT_SIM7020/NBIoT_SIM7020.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_Notify/Notify_BLE/Notify_BLE.ino b/examples/Blinker_Notify/Notify_BLE/Notify_BLE.ino index 84c08b98..d80d475f 100644 --- a/examples/Blinker_Notify/Notify_BLE/Notify_BLE.ino +++ b/examples/Blinker_Notify/Notify_BLE/Notify_BLE.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_Notify/Notify_WiFi/Notify_WiFi.ino b/examples/Blinker_Notify/Notify_WiFi/Notify_WiFi.ino index f57317e5..1abb3455 100644 --- a/examples/Blinker_Notify/Notify_WiFi/Notify_WiFi.ino +++ b/examples/Blinker_Notify/Notify_WiFi/Notify_WiFi.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_Number/Number_BLE/Number_BLE.ino b/examples/Blinker_Number/Number_BLE/Number_BLE.ino index e7792151..5344e19a 100644 --- a/examples/Blinker_Number/Number_BLE/Number_BLE.ino +++ b/examples/Blinker_Number/Number_BLE/Number_BLE.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_Number/Number_WiFi/Number_WiFi.ino b/examples/Blinker_Number/Number_WiFi/Number_WiFi.ino index d34621be..04ee1d05 100644 --- a/examples/Blinker_Number/Number_WiFi/Number_WiFi.ino +++ b/examples/Blinker_Number/Number_WiFi/Number_WiFi.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_OTA/OTA_WiFi/OTA_WiFi.ino b/examples/Blinker_OTA/OTA_WiFi/OTA_WiFi.ino index f33451e4..27edb241 100644 --- a/examples/Blinker_OTA/OTA_WiFi/OTA_WiFi.ino +++ b/examples/Blinker_OTA/OTA_WiFi/OTA_WiFi.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_PRO/Blinker_PRO_AIR202/Blinker_PRO_AIR202.ino b/examples/Blinker_PRO/Blinker_PRO_AIR202/Blinker_PRO_AIR202.ino index c9e67afc..280b12f4 100644 --- a/examples/Blinker_PRO/Blinker_PRO_AIR202/Blinker_PRO_AIR202.ino +++ b/examples/Blinker_PRO/Blinker_PRO_AIR202/Blinker_PRO_AIR202.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_PRO/Blinker_PRO_Change_Server/Blinker_Pro_Change_Server.ino b/examples/Blinker_PRO/Blinker_PRO_Change_Server/Blinker_Pro_Change_Server.ino index 24249971..6df1a0f5 100644 --- a/examples/Blinker_PRO/Blinker_PRO_Change_Server/Blinker_Pro_Change_Server.ino +++ b/examples/Blinker_PRO/Blinker_PRO_Change_Server/Blinker_Pro_Change_Server.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_PRO/Blinker_PRO_ESP/Blinker_PRO_ESP.ino b/examples/Blinker_PRO/Blinker_PRO_ESP/Blinker_PRO_ESP.ino index 97a274da..bb896b7a 100644 --- a/examples/Blinker_PRO/Blinker_PRO_ESP/Blinker_PRO_ESP.ino +++ b/examples/Blinker_PRO/Blinker_PRO_ESP/Blinker_PRO_ESP.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_PRO/Blinker_PRO_ESP_APCONFIG/Blinker_PRO_ESP_APCONFIG.ino b/examples/Blinker_PRO/Blinker_PRO_ESP_APCONFIG/Blinker_PRO_ESP_APCONFIG.ino index 5e0f8b75..9ebde3bf 100644 --- a/examples/Blinker_PRO/Blinker_PRO_ESP_APCONFIG/Blinker_PRO_ESP_APCONFIG.ino +++ b/examples/Blinker_PRO/Blinker_PRO_ESP_APCONFIG/Blinker_PRO_ESP_APCONFIG.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_PRO/Blinker_PRO_SIM7020/Blinker_PRO_SIM7020.ino b/examples/Blinker_PRO/Blinker_PRO_SIM7020/Blinker_PRO_SIM7020.ino index c48bcb98..414110ad 100644 --- a/examples/Blinker_PRO/Blinker_PRO_SIM7020/Blinker_PRO_SIM7020.ino +++ b/examples/Blinker_PRO/Blinker_PRO_SIM7020/Blinker_PRO_SIM7020.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_PRO_Device/Blinker_PRO_Plug/Blinker_PRO_Plug.ino b/examples/Blinker_PRO_Device/Blinker_PRO_Plug/Blinker_PRO_Plug.ino index 04457017..be1ddb8f 100644 --- a/examples/Blinker_PRO_Device/Blinker_PRO_Plug/Blinker_PRO_Plug.ino +++ b/examples/Blinker_PRO_Device/Blinker_PRO_Plug/Blinker_PRO_Plug.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_PRO_Wlan_Config/Blinker_PRO_Wlan_Config.ino b/examples/Blinker_PRO_Wlan_Config/Blinker_PRO_Wlan_Config.ino index d1d19a92..d11c9c7f 100644 --- a/examples/Blinker_PRO_Wlan_Config/Blinker_PRO_Wlan_Config.ino +++ b/examples/Blinker_PRO_Wlan_Config/Blinker_PRO_Wlan_Config.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_PUSH/PUSH_WiFi/PUSH_WiFi.ino b/examples/Blinker_PUSH/PUSH_WiFi/PUSH_WiFi.ino index bdeef049..cfea49ce 100644 --- a/examples/Blinker_PUSH/PUSH_WiFi/PUSH_WiFi.ino +++ b/examples/Blinker_PUSH/PUSH_WiFi/PUSH_WiFi.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_Print/Print_BLE/Print_BLE.ino b/examples/Blinker_Print/Print_BLE/Print_BLE.ino index 0e232850..13846ebe 100644 --- a/examples/Blinker_Print/Print_BLE/Print_BLE.ino +++ b/examples/Blinker_Print/Print_BLE/Print_BLE.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_Print/Print_WiFi/Print_WiFi.ino b/examples/Blinker_Print/Print_WiFi/Print_WiFi.ino index 661a9225..1933ccab 100644 --- a/examples/Blinker_Print/Print_WiFi/Print_WiFi.ino +++ b/examples/Blinker_Print/Print_WiFi/Print_WiFi.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_QRCode_NBIoT/Blinker_QRCode_NBIoT.ino b/examples/Blinker_QRCode_NBIoT/Blinker_QRCode_NBIoT.ino new file mode 100644 index 00000000..353388e4 --- /dev/null +++ b/examples/Blinker_QRCode_NBIoT/Blinker_QRCode_NBIoT.ino @@ -0,0 +1,87 @@ +/* ***************************************************************** + * + * Download latest Blinker library here: + * https://github.com/blinker-iot/blinker-library/archive/master.zip + * + * + * Blinker is a cross-hardware, cross-platform solution for the IoT. + * It provides APP, device and server support, + * and uses public cloud services for data transmission and storage. + * It can be used in smart home, data monitoring and other fields + * to help users build Internet of Things projects better and faster. + * + * Make sure installed 2.7.2 or later ESP8266/Arduino package, + * if use ESP8266 with Blinker. + * https://github.com/esp8266/Arduino/releases + * + * Make sure installed 1.0.4 or later ESP32/Arduino package, + * if use ESP32 with Blinker. + * https://github.com/espressif/arduino-esp32/releases + * + * Docs: https://diandeng.tech/doc + * https://github.com/blinker-iot/blinker-doc/wiki + * + * ***************************************************************** + * + * Blinker 库下载地址: + * https://github.com/blinker-iot/blinker-library/archive/master.zip + * + * Blinker 是一套跨硬件、跨平台的物联网解决方案,提供APP端、设备端、 + * 服务器端支持,使用公有云服务进行数据传输存储。可用于智能家居、 + * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 + * + * 如果使用 ESP8266 接入 Blinker, + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 + * https://github.com/esp8266/Arduino/releases + * + * 如果使用 ESP32 接入 Blinker, + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 + * https://github.com/espressif/arduino-esp32/releases + * + * 文档: https://diandeng.tech/doc + * https://github.com/blinker-iot/blinker-doc/wiki + * + * *****************************************************************/ + +#define BLINKER_QRCODE_NBIOT_SIM7020 + +#include + +char type[] = ""; +char auth[] = ""; + +BlinkerButton Button1("btn-abc"); +BlinkerNumber Number1("num-abc"); + +int counter = 0; + +void button1_callback(const String & state) +{ + BLINKER_LOG("get button state: ", state); + digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN)); +} + +void dataRead(const String & data) +{ + BLINKER_LOG("Blinker readString: ", data); + counter++; + Number1.print(counter); +} + +void setup() { + Serial.begin(115200); + BLINKER_DEBUG.stream(Serial); + BLINKER_DEBUG.debugAll(); + + pinMode(LED_BUILTIN, OUTPUT); + digitalWrite(LED_BUILTIN, HIGH); + + Blinker.begin(auth, type, D6, D7); + Blinker.attachData(dataRead); + + Button1.attach(button1_callback); +} + +void loop() { + Blinker.run(); +} \ No newline at end of file diff --git a/examples/Blinker_RGB/RGB_BLE/RGB_BLE.ino b/examples/Blinker_RGB/RGB_BLE/RGB_BLE.ino index f9c576f3..c529e443 100644 --- a/examples/Blinker_RGB/RGB_BLE/RGB_BLE.ino +++ b/examples/Blinker_RGB/RGB_BLE/RGB_BLE.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_RGB/RGB_WiFi/RGB_WiFi.ino b/examples/Blinker_RGB/RGB_WiFi/RGB_WiFi.ino index 9efd5ab3..534e656f 100644 --- a/examples/Blinker_RGB/RGB_WiFi/RGB_WiFi.ino +++ b/examples/Blinker_RGB/RGB_WiFi/RGB_WiFi.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_SMS/SMS_WiFi/SMS_WiFi.ino b/examples/Blinker_SMS/SMS_WiFi/SMS_WiFi.ino index 64fb386c..d7dfd3d9 100644 --- a/examples/Blinker_SMS/SMS_WiFi/SMS_WiFi.ino +++ b/examples/Blinker_SMS/SMS_WiFi/SMS_WiFi.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_Slider/Slider_BLE/Slider_BLE.ino b/examples/Blinker_Slider/Slider_BLE/Slider_BLE.ino index 8db09188..9b285b6e 100644 --- a/examples/Blinker_Slider/Slider_BLE/Slider_BLE.ino +++ b/examples/Blinker_Slider/Slider_BLE/Slider_BLE.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_Slider/Slider_WiFi/Slider_WiFi.ino b/examples/Blinker_Slider/Slider_WiFi/Slider_WiFi.ino index bb81cbe3..d5ddddbe 100644 --- a/examples/Blinker_Slider/Slider_WiFi/Slider_WiFi.ino +++ b/examples/Blinker_Slider/Slider_WiFi/Slider_WiFi.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_SubDevice/SubDevice_WiFi/SubDevice_WiFi.ino b/examples/Blinker_SubDevice/SubDevice_WiFi/SubDevice_WiFi.ino index 42701c15..dcb387a9 100644 --- a/examples/Blinker_SubDevice/SubDevice_WiFi/SubDevice_WiFi.ino +++ b/examples/Blinker_SubDevice/SubDevice_WiFi/SubDevice_WiFi.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_Summary/Summary_WiFi/Summary_WiFi.ino b/examples/Blinker_Summary/Summary_WiFi/Summary_WiFi.ino index 268a97cb..e3cf2978 100644 --- a/examples/Blinker_Summary/Summary_WiFi/Summary_WiFi.ino +++ b/examples/Blinker_Summary/Summary_WiFi/Summary_WiFi.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_Switch/Switch_BLE/Switch_BLE.ino b/examples/Blinker_Switch/Switch_BLE/Switch_BLE.ino index 65e6894a..aaf244fe 100644 --- a/examples/Blinker_Switch/Switch_BLE/Switch_BLE.ino +++ b/examples/Blinker_Switch/Switch_BLE/Switch_BLE.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_Switch/Switch_WiFi/Switch_WiFi.ino b/examples/Blinker_Switch/Switch_WiFi/Switch_WiFi.ino index 9102dc98..a483c398 100644 --- a/examples/Blinker_Switch/Switch_WiFi/Switch_WiFi.ino +++ b/examples/Blinker_Switch/Switch_WiFi/Switch_WiFi.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_TASK/TASK_BLE/TASK_BLE.ino b/examples/Blinker_TASK/TASK_BLE/TASK_BLE.ino index 3a7afbeb..3ecd499a 100644 --- a/examples/Blinker_TASK/TASK_BLE/TASK_BLE.ino +++ b/examples/Blinker_TASK/TASK_BLE/TASK_BLE.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_TASK/TASK_WiFi/TASK_WiFi.ino b/examples/Blinker_TASK/TASK_WiFi/TASK_WiFi.ino index cbc73934..26c4d3ee 100644 --- a/examples/Blinker_TASK/TASK_WiFi/TASK_WiFi.ino +++ b/examples/Blinker_TASK/TASK_WiFi/TASK_WiFi.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_TEXT/TEXT_BLE/TEXT_BLE.ino b/examples/Blinker_TEXT/TEXT_BLE/TEXT_BLE.ino index 293f581d..5624f6fa 100644 --- a/examples/Blinker_TEXT/TEXT_BLE/TEXT_BLE.ino +++ b/examples/Blinker_TEXT/TEXT_BLE/TEXT_BLE.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_TEXT/TEXT_WiFi/TEXT_WiFi.ino b/examples/Blinker_TEXT/TEXT_WiFi/TEXT_WiFi.ino index e1d09fec..db1dacc0 100644 --- a/examples/Blinker_TEXT/TEXT_WiFi/TEXT_WiFi.ino +++ b/examples/Blinker_TEXT/TEXT_WiFi/TEXT_WiFi.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_Tab/Tab_WiFi/Tab_WiFi.ino b/examples/Blinker_Tab/Tab_WiFi/Tab_WiFi.ino index 67d8a7b9..c53abfee 100644 --- a/examples/Blinker_Tab/Tab_WiFi/Tab_WiFi.ino +++ b/examples/Blinker_Tab/Tab_WiFi/Tab_WiFi.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_Ticker/Ticker_BLE/Ticker_BLE.ino b/examples/Blinker_Ticker/Ticker_BLE/Ticker_BLE.ino index 24bab401..3fe896dd 100644 --- a/examples/Blinker_Ticker/Ticker_BLE/Ticker_BLE.ino +++ b/examples/Blinker_Ticker/Ticker_BLE/Ticker_BLE.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_Time/Time_WiFi/Time_WiFi.ino b/examples/Blinker_Time/Time_WiFi/Time_WiFi.ino index 7e915fe4..e337c66c 100644 --- a/examples/Blinker_Time/Time_WiFi/Time_WiFi.ino +++ b/examples/Blinker_Time/Time_WiFi/Time_WiFi.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_WECHAT/WECHAT_WiFi/WECHAT_WiFi.ino b/examples/Blinker_WECHAT/WECHAT_WiFi/WECHAT_WiFi.ino index e6ffbe39..314bfe87 100644 --- a/examples/Blinker_WECHAT/WECHAT_WiFi/WECHAT_WiFi.ino +++ b/examples/Blinker_WECHAT/WECHAT_WiFi/WECHAT_WiFi.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_WS2812/WS2812_BLE/WS2812_BLE.ino b/examples/Blinker_WS2812/WS2812_BLE/WS2812_BLE.ino index 1d4af9fb..813bc9ac 100644 --- a/examples/Blinker_WS2812/WS2812_BLE/WS2812_BLE.ino +++ b/examples/Blinker_WS2812/WS2812_BLE/WS2812_BLE.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_WS2812/WS2812_WiFi/WS2812_WiFi.ino b/examples/Blinker_WS2812/WS2812_WiFi/WS2812_WiFi.ino index fd606166..900b56fa 100644 --- a/examples/Blinker_WS2812/WS2812_WiFi/WS2812_WiFi.ino +++ b/examples/Blinker_WS2812/WS2812_WiFi/WS2812_WiFi.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/examples/Blinker_Weather/Weather_WiFi/Weather_WiFi.ino b/examples/Blinker_Weather/Weather_WiFi/Weather_WiFi.ino index 5d5308f1..6b28a0a9 100644 --- a/examples/Blinker_Weather/Weather_WiFi/Weather_WiFi.ino +++ b/examples/Blinker_Weather/Weather_WiFi/Weather_WiFi.ino @@ -10,11 +10,11 @@ * It can be used in smart home, data monitoring and other fields * to help users build Internet of Things projects better and faster. * - * Make sure installed 2.5.0 or later ESP8266/Arduino package, + * Make sure installed 2.7.2 or later ESP8266/Arduino package, * if use ESP8266 with Blinker. * https://github.com/esp8266/Arduino/releases * - * Make sure installed 1.0.2 or later ESP32/Arduino package, + * Make sure installed 1.0.4 or later ESP32/Arduino package, * if use ESP32 with Blinker. * https://github.com/espressif/arduino-esp32/releases * @@ -31,11 +31,11 @@ * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 * * 如果使用 ESP8266 接入 Blinker, - * 请确保安装了 2.5.0 或更新的 ESP8266/Arduino 支持包。 + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 * https://github.com/esp8266/Arduino/releases * * 如果使用 ESP32 接入 Blinker, - * 请确保安装了 1.0.2 或更新的 ESP32/Arduino 支持包。 + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 * https://github.com/espressif/arduino-esp32/releases * * 文档: https://diandeng.tech/doc diff --git a/keywords.txt b/keywords.txt index 930b1280..fe619fcf 100644 --- a/keywords.txt +++ b/keywords.txt @@ -155,6 +155,7 @@ BLINKER_NBIOT_WH KEYWORD2 BLINKER_GPRS_AIR202 KEYWORD2 BLINKER_GPRS KEYWORD2 BLINKER_NBIOT_SIM7020 KEYWORD2 +BLINKER_QRCODE_NBIOT_SIM7020 KEYWORD2 BLINKER_PRO_SIM7020 KEYWORD2 BLINKER_PRO_AIR202 KEYWORD2 BLINKER_ESP_AT KEYWORD2 diff --git a/src/Adapters/BlinkerSerialSIM7020.h b/src/Adapters/BlinkerSerialSIM7020.h index 686416b9..08f0ee59 100644 --- a/src/Adapters/BlinkerSerialSIM7020.h +++ b/src/Adapters/BlinkerSerialSIM7020.h @@ -154,11 +154,11 @@ int BlinkerSerialSIM7020::connect() if (!isMQTTinit) return false; // if (mqtt_NBIoT->connected()) return true; - // if (isConnect) return true; + if (isConnect) return true; BLINKER_LOG_ALL(BLINKER_F(">>>>>> mqtt connect failed <<<<<<")); - // disconnect(); + disconnect(); // if ((millis() - latestTime) < BLINKER_MQTT_CONNECT_TIMESLOT && latestTime > 0) // { @@ -202,7 +202,7 @@ int BlinkerSerialSIM7020::connected() { if (!isMQTTinit) return false; - return mqtt_NBIoT->connected(); + return isConnect;//mqtt_NBIoT->connected(); } int BlinkerSerialSIM7020::mConnected() @@ -213,7 +213,10 @@ int BlinkerSerialSIM7020::mConnected() void BlinkerSerialSIM7020::disconnect() { - if (isMQTTinit) mqtt_NBIoT->disconnect(); + if (isMQTTinit) { + isConnect = false; + mqtt_NBIoT->disconnect(); + } } void BlinkerSerialSIM7020::ping() @@ -481,7 +484,7 @@ int BlinkerSerialSIM7020::print(char * data, bool needCheck) respTime = millis(); } - if (mqtt_NBIoT->connected()) + if (connected()) { if (needCheck) { @@ -500,6 +503,8 @@ int BlinkerSerialSIM7020::print(char * data, bool needCheck) BLINKER_LOG_ALL(data); BLINKER_LOG_ALL(BLINKER_F("...Failed")); BLINKER_LOG_FreeHeap_ALL(); + + disconnect(); if (!_alive) { diff --git a/src/Blinker.h b/src/Blinker.h index 634f66b3..e669bd6a 100644 --- a/src/Blinker.h +++ b/src/Blinker.h @@ -203,6 +203,12 @@ #include "BlinkerLowPowerGPRS.h" BlinkerLowPowerGPRS Blinker; + +#elif defined(BLINKER_QRCODE_NBIOT_SIM7020) + + #include "BlinkerQRCodeSIMNBIOT.h" + + BlinkerQRCodeSerialSIMNBIoT Blinker; #else diff --git a/src/Blinker/BlinkerApi.h b/src/Blinker/BlinkerApi.h index d2257958..25fb0af3 100644 --- a/src/Blinker/BlinkerApi.h +++ b/src/Blinker/BlinkerApi.h @@ -73,7 +73,8 @@ // #include "../modules/base64/Base64.h" #endif -#if defined(BLINKER_NBIOT_SIM7020) || defined(BLINKER_PRO_SIM7020) +#if defined(BLINKER_NBIOT_SIM7020) || defined(BLINKER_PRO_SIM7020) || \ + defined(BLINKER_QRCODE_NBIOT_SIM7020) // #include "Blinker/BlinkerAuto.h" #include "Functions/BlinkerSIM7020.h" #include "Functions/BlinkerHTTPSIM7020.h" @@ -187,7 +188,8 @@ enum b_nbiot_status_t { }; #endif -#if defined(BLINKER_NBIOT_SIM7020) || defined(BLINKER_PRO_SIM7020) +#if defined(BLINKER_NBIOT_SIM7020) || defined(BLINKER_PRO_SIM7020) || \ + defined(BLINKER_QRCODE_NBIOT_SIM7020) enum BlinkerStatus_t { NBIOT_DEV_POWER_CHECK, @@ -323,7 +325,7 @@ class BlinkerApi : public BlinkerProtocol defined(BLINKER_GPRS_AIR202) || defined(BLINKER_PRO_SIM7020) || \ defined(BLINKER_PRO_AIR202) || defined(BLINKER_MQTT_AUTO) || \ defined(BLINKER_PRO_ESP) || defined(BLINKER_LOWPOWER_AIR202) || \ - defined(BLINKER_WIFI_SUBDEVICE) + defined(BLINKER_WIFI_SUBDEVICE) || defined(BLINKER_QRCODE_NBIOT_SIM7020) void setTimezone(float tz); @@ -376,7 +378,7 @@ class BlinkerApi : public BlinkerProtocol #if (!defined(BLINKER_NBIOT_SIM7020) && !defined(BLINKER_GPRS_AIR202) && \ !defined(BLINKER_PRO_SIM7020) && !defined(BLINKER_PRO_AIR202) && \ - !defined(BLINKER_LOWPOWER_AIR202)) + !defined(BLINKER_LOWPOWER_AIR202)) && !defined(BLINKER_QRCODE_NBIOT_SIM7020) void loadTimer(); void deleteTimer(); void deleteCountdown(); @@ -410,7 +412,7 @@ class BlinkerApi : public BlinkerProtocol // bool bridge(char _name[]); #if (!defined(BLINKER_NBIOT_SIM7020) && !defined(BLINKER_GPRS_AIR202) && \ !defined(BLINKER_PRO_SIM7020) && !defined(BLINKER_PRO_AIR202) && \ - !defined(BLINKER_LOWPOWER_AIR202)) + !defined(BLINKER_LOWPOWER_AIR202)) & !defined(BLINKER_QRCODE_NBIOT_SIM7020) bool autoPull(); void autoInit() { autoStart(); } // void autoInput(const String & key, const String & state); @@ -436,7 +438,7 @@ class BlinkerApi : public BlinkerProtocol #if (!defined(BLINKER_NBIOT_SIM7020) && !defined(BLINKER_GPRS_AIR202) && \ !defined(BLINKER_PRO_SIM7020) && !defined(BLINKER_PRO_AIR202) && \ - !defined(BLINKER_LOWPOWER_AIR202)) + !defined(BLINKER_LOWPOWER_AIR202)) && !defined(BLINKER_QRCODE_NBIOT_SIM7020) bool otaInit = false; void loadOTA(); void ota(); @@ -610,7 +612,8 @@ class BlinkerApi : public BlinkerProtocol void aligeniePrint(String & _msg); void duerPrint(String & _msg, bool report = false); #if !defined(BLINKER_GPRS_AIR202) && !defined(BLINKER_NBIOT_SIM7020) && \ - !defined(BLINKER_PRO_SIM7020) && !defined(BLINKER_PRO_AIR202) + !defined(BLINKER_PRO_SIM7020) && !defined(BLINKER_PRO_AIR202) && \ + !defined(BLINKER_QRCODE_NBIOT_SIM7020) void miotPrint(String & _msg); #endif #endif @@ -620,7 +623,8 @@ class BlinkerApi : public BlinkerProtocol defined(BLINKER_PRO_SIM7020) || defined(BLINKER_PRO_AIR202) || \ defined(BLINKER_GPRS_AIR202) || defined(BLINKER_NBIOT_SIM7020) || \ defined(BLINKER_MQTT_AUTO) || defined(BLINKER_PRO_ESP) || \ - defined(BLINKER_LOWPOWER_AIR202) || defined(BLINKER_WIFI_SUBDEVICE) + defined(BLINKER_LOWPOWER_AIR202) || defined(BLINKER_WIFI_SUBDEVICE) || \ + defined(BLINKER_QRCODE_NBIOT_SIM7020) // #if !defined(BLINKER_AT_MQTT) void attachDataStorage(blinker_callback_t newFunction, uint32_t _time = 60, uint8_t d_times = BLINKER_DATA_UPDATE_COUNT) @@ -745,7 +749,7 @@ class BlinkerApi : public BlinkerProtocol { _resetAIRFunc = newFunction; } #endif - #if defined(BLINKER_NBIOT_SIM7020) + #if defined(BLINKER_NBIOT_SIM7020) || defined(BLINKER_QRCODE_NBIOT_SIM7020) void attachSIM7020Reset(blinker_callback_t newFunction) { _resetSIMFunc = newFunction; } #endif @@ -794,7 +798,8 @@ class BlinkerApi : public BlinkerProtocol defined(BLINKER_GPRS_AIR202) || defined(BLINKER_PRO_SIM7020) || \ defined(BLINKER_PRO_AIR202) || defined(BLINKER_MQTT_AUTO) || \ defined(BLINKER_PRO_ESP) || defined(BLINKER_LOWPOWER_AIR202) || \ - defined(BLINKER_LOWPOWER_AIR202) || defined(BLINKER_WIFI_SUBDEVICE) + defined(BLINKER_LOWPOWER_AIR202) || defined(BLINKER_WIFI_SUBDEVICE) || \ + defined(BLINKER_QRCODE_NBIOT_SIM7020) bool _isInit = false; bool _isAuto = false; bool _isAutoInit = false; @@ -848,7 +853,8 @@ class BlinkerApi : public BlinkerProtocol #if (!defined(BLINKER_NBIOT_SIM7020) && !defined(BLINKER_GPRS_AIR202) && \ !defined(BLINKER_PRO_SIM7020) && !defined(BLINKER_PRO_AIR202) && \ - !defined(BLINKER_LOWPOWER_AIR202) && !defined(BLINKER_LOWPOWER_AIR202)) + !defined(BLINKER_LOWPOWER_AIR202) && !defined(BLINKER_LOWPOWER_AIR202)) && \ + !defined(BLINKER_QRCODE_NBIOT_SIM7020) char _cdAction[BLINKER_TIMER_COUNTDOWN_ACTION_SIZE]; char _lpAction1[BLINKER_TIMER_LOOP_ACTION1_SIZE]; char _lpAction2[BLINKER_TIMER_LOOP_ACTION2_SIZE]; @@ -862,7 +868,8 @@ class BlinkerApi : public BlinkerProtocol #if (!defined(BLINKER_NBIOT_SIM7020) && !defined(BLINKER_GPRS_AIR202) && \ !defined(BLINKER_PRO_SIM7020) && !defined(BLINKER_PRO_AIR202) && \ - !defined(BLINKER_LOWPOWER_AIR202) && !defined(BLINKER_LOWPOWER_AIR202)) + !defined(BLINKER_LOWPOWER_AIR202) && !defined(BLINKER_LOWPOWER_AIR202)) && \ + !defined(BLINKER_QRCODE_NBIOT_SIM7020) class BlinkerAUTO * _AUTO[2]; #if !defined(BLINKER_WIFI_SUBDEVICE) BlinkerOTA _OTA; @@ -927,7 +934,8 @@ class BlinkerApi : public BlinkerProtocol blinker_callback_t _resetAIRFunc = NULL; #endif - #if defined(BLINKER_NBIOT_SIM7020) || defined(BLINKER_PRO_SIM7020) + #if defined(BLINKER_NBIOT_SIM7020) || defined(BLINKER_PRO_SIM7020) || \ + defined(BLINKER_QRCODE_NBIOT_SIM7020) bool _isConnBegin = false; bool _getRegister = false; // bool _isInit = false; @@ -949,7 +957,7 @@ class BlinkerApi : public BlinkerProtocol defined(BLINKER_PRO_AIR202) || defined(BLINKER_MQTT_AUTO) || \ defined(BLINKER_GPRS_AIR202) || defined(BLINKER_NBIOT_SIM7020) || \ defined(BLINKER_PRO_ESP) || defined(BLINKER_LOWPOWER_AIR202) || \ - defined(BLINKER_WIFI_SUBDEVICE) + defined(BLINKER_WIFI_SUBDEVICE) || defined(BLINKER_QRCODE_NBIOT_SIM7020) blinker_callback_with_string_uint8_arg_t _AliGeniePowerStateFunc_m = NULL; blinker_callback_with_string_arg_t _AliGeniePowerStateFunc = NULL; blinker_callback_with_string_arg_t _AliGenieSetColorFunc = NULL; @@ -1679,7 +1687,8 @@ class BlinkerApi : public BlinkerProtocol } #endif - #if defined(BLINKER_NBIOT_SIM7020) || defined(BLINKER_PRO_SIM7020) + #if defined(BLINKER_NBIOT_SIM7020) || defined(BLINKER_PRO_SIM7020) || \ + defined(BLINKER_QRCODE_NBIOT_SIM7020) bool ntpInit() { if (!_isNTPInit) @@ -2213,11 +2222,11 @@ class BlinkerApi : public BlinkerProtocol defined(BLINKER_GPRS_AIR202) || defined(BLINKER_PRO_SIM7020) || \ defined(BLINKER_PRO_AIR202) || defined(BLINKER_MQTT_AUTO) || \ defined(BLINKER_PRO_ESP) || defined(BLINKER_LOWPOWER_AIR202) || \ - defined(BLINKER_WIFI_SUBDEVICE) + defined(BLINKER_WIFI_SUBDEVICE) || defined(BLINKER_QRCODE_NBIOT_SIM7020) #if (!defined(BLINKER_NBIOT_SIM7020) && !defined(BLINKER_GPRS_AIR202) && \ !defined(BLINKER_PRO_SIM7020) && !defined(BLINKER_PRO_AIR202) && \ - !defined(BLINKER_LOWPOWER_AIR202)) + !defined(BLINKER_LOWPOWER_AIR202) && !defined(BLINKER_QRCODE_NBIOT_SIM7020)) void beginAuto(); bool autoTrigged(uint32_t _id); @@ -2283,7 +2292,7 @@ class BlinkerApi : public BlinkerProtocol #if (!defined(BLINKER_NBIOT_SIM7020) && !defined(BLINKER_GPRS_AIR202) && \ !defined(BLINKER_PRO_SIM7020) && !defined(BLINKER_PRO_AIR202) && \ - !defined(BLINKER_LOWPOWER_AIR202)) + !defined(BLINKER_LOWPOWER_AIR202) && !defined(BLINKER_QRCODE_NBIOT_SIM7020)) void shareParse(const JsonObject& data); #if !defined(BLINKER_WIFI_SUBDEVICE) @@ -2304,7 +2313,7 @@ class BlinkerApi : public BlinkerProtocol #if (!defined(BLINKER_NBIOT_SIM7020) && !defined(BLINKER_GPRS_AIR202) && \ !defined(BLINKER_PRO_SIM7020) && !defined(BLINKER_PRO_AIR202) && \ - !defined(BLINKER_LOWPOWER_AIR202)) + !defined(BLINKER_LOWPOWER_AIR202) && !defined(BLINKER_QRCODE_NBIOT_SIM7020)) // String postServer(const String & url, const String & host, int port, const String & msg); // String getServer(const String & url, const String & host, int port); @@ -2323,7 +2332,7 @@ class BlinkerApi : public BlinkerProtocol defined(BLINKER_NBIOT_SIM7020) || defined(BLINKER_PRO_SIM7020) || \ defined(BLINKER_PRO_SIM7020) || defined(BLINKER_PRO_AIR202) || \ defined(BLINKER_MQTT_AUTO) || defined(BLINKER_PRO_ESP) || \ - defined(BLINKER_WIFI_SUBDEVICE) + defined(BLINKER_WIFI_SUBDEVICE) || defined(BLINKER_QRCODE_NBIOT_SIM7020) void aliParse(const String & _data); void duerParse(const String & _data); void miotParse(const String & _data); @@ -2362,6 +2371,9 @@ class BlinkerApi : public BlinkerProtocol void atInit(const char* _auth, const char* _ssid, const char* _pswd); #endif + #if defined(BLINKER_QRCODE_NBIOT_SIM7020) + const char* _vipKey; + #endif #if defined(BLINKER_PRO) || defined(BLINKER_PRO_SIM7020) || \ defined(BLINKER_PRO_AIR202) || defined(BLINKER_MQTT_AUTO) || \ defined(BLINKER_PRO_ESP) || defined(BLINKER_WIFI_GATEWAY) || \ @@ -2555,12 +2567,15 @@ class BlinkerApi : public BlinkerProtocol #if defined(BLINKER_GPRS_AIR202) || defined(BLINKER_NBIOT_SIM7020) || \ defined(BLINKER_PRO_SIM7020) || defined(BLINKER_PRO_AIR202) || \ - defined(BLINKER_LOWPOWER_AIR202) + defined(BLINKER_LOWPOWER_AIR202) || defined(BLINKER_QRCODE_NBIOT_SIM7020) Stream* stream; bool isHWS = false; blinker_callback_t listenFunc = NULL; void begin(const char* _type, Stream& s, bool isHardware, blinker_callback_t _func); + #if defined(BLINKER_QRCODE_NBIOT_SIM7020) + void begin(const char* _auth, const char* _type, Stream& s, bool isHardware, blinker_callback_t _func); + #endif void setType(const char* _type) { _deviceType = _type; @@ -2635,7 +2650,8 @@ void BlinkerApi::needInit() defined(BLINKER_WIFI_GATEWAY) || defined(BLINKER_NBIOT_SIM7020) || \ defined(BLINKER_GPRS_AIR202) || defined(BLINKER_PRO_SIM7020) || \ defined(BLINKER_PRO_AIR202) || defined(BLINKER_MQTT_AUTO) || \ - defined(BLINKER_PRO_ESP) || defined(BLINKER_LOWPOWER_AIR202) + defined(BLINKER_PRO_ESP) || defined(BLINKER_LOWPOWER_AIR202) || \ + defined(BLINKER_QRCODE_NBIOT_SIM7020) BLINKER_LOG_ALL(BLINKER_F("==== needInit ====")); #if !defined(BLINKER_LOWPOWER_AIR202) String _shareData = freshSharers(); @@ -2653,7 +2669,7 @@ void BlinkerApi::needInit() #if (!defined(BLINKER_NBIOT_SIM7020) && !defined(BLINKER_GPRS_AIR202) && \ !defined(BLINKER_PRO_SIM7020) && !defined(BLINKER_PRO_AIR202) && \ - !defined(BLINKER_LOWPOWER_AIR202)) + !defined(BLINKER_LOWPOWER_AIR202) && !defined(BLINKER_QRCODE_NBIOT_SIM7020)) loadTiming(); #endif @@ -2737,7 +2753,8 @@ void BlinkerApi::needInit() #endif #if defined(BLINKER_GPRS_AIR202) || defined(BLINKER_NBIOT_SIM7020) || \ - defined(BLINKER_PRO_SIM7020) || defined(BLINKER_PRO_AIR202) + defined(BLINKER_PRO_SIM7020) || defined(BLINKER_PRO_AIR202) || \ + defined(BLINKER_QRCODE_NBIOT_SIM7020) void BlinkerApi::begin(const char* _type, Stream& s, bool isHardware, blinker_callback_t _func) { @@ -2748,6 +2765,23 @@ void BlinkerApi::needInit() stream = &s; isHWS = isHardware; listenFunc = _func; } + #if defined(BLINKER_QRCODE_NBIOT_SIM7020) + void BlinkerApi::begin(const char* _auth, + const char* _type, + Stream& s, bool isHardware, + blinker_callback_t _func) + { + _vipKey = _auth; + setType(_type); + // begin(_type); + begin(); + + // setType(_type); + + stream = &s; isHWS = isHardware; + listenFunc = _func; + } + #endif #endif #if defined(BLINKER_LOWPOWER_AIR202) @@ -3604,7 +3638,8 @@ void BlinkerApi::run() } #endif - #if defined(BLINKER_NBIOT_SIM7020) || defined(BLINKER_PRO_SIM7020) + #if defined(BLINKER_NBIOT_SIM7020) || defined(BLINKER_PRO_SIM7020) || \ + defined(BLINKER_QRCODE_NBIOT_SIM7020) if ((millis() - _checkCrash) >= 60000 || _checkCrash == 0) { BLINKER_LOG_ALL(BLINKER_F(">>>>>>check crash<<<<<<")); @@ -3681,7 +3716,11 @@ void BlinkerApi::run() { _nbiotStatus = NBIOT_DEV_POWER_ON; - BProto::begin(type(), getIMEI()); + #if defined(BLINKER_QRCODE_NBIOT_SIM7020) + BProto::begin(_vipKey, type(), getIMEI()); + #else + BProto::begin(type(), getIMEI()); + #endif _isConnBegin = true; _initTime = millis(); @@ -4168,10 +4207,11 @@ void BlinkerApi::run() defined(BLINKER_AT_MQTT) || defined(BLINKER_WIFI_GATEWAY) || \ defined(BLINKER_GPRS_AIR202) || defined(BLINKER_NBIOT_SIM7020) || \ defined(BLINKER_MQTT_AUTO) || defined(BLINKER_PRO_ESP) || \ - defined(BLINKER_LOWPOWER_AIR202) || defined(BLINKER_WIFI_SUBDEVICE) + defined(BLINKER_LOWPOWER_AIR202) || defined(BLINKER_WIFI_SUBDEVICE) || \ + defined(BLINKER_QRCODE_NBIOT_SIM7020) #if !defined(BLINKER_GPRS_AIR202) && !defined(BLINKER_NBIOT_SIM7020) && \ - !defined(BLINKER_LOWPOWER_AIR202) + !defined(BLINKER_LOWPOWER_AIR202) && !defined(BLINKER_QRCODE_NBIOT_SIM7020) if (_isAuto && _isInit && state == CONNECTED && !_isAutoInit) { // if (autoPull()) _isAutoInit = true; @@ -4206,7 +4246,7 @@ void BlinkerApi::run() #if defined(BLINKER_GPRS_AIR202) || defined(BLINKER_LOWPOWER_AIR202) BLINKER_LOG_ALL("need reset!"); if (_resetAIRFunc) _resetAIRFunc(); - #elif defined(BLINKER_NBIOT_SIM7020) + #elif defined(BLINKER_NBIOT_SIM7020) || defined(BLINKER_QRCODE_NBIOT_SIM7020) // stream->println(BLINKER_CMD_CRESET_RESQ); // ::delay(5000); // BLINKER_LOG_ALL("need reset!"); @@ -4794,7 +4834,7 @@ float BlinkerApi::gps(b_gps_t axis) defined(BLINKER_GPRS_AIR202) || defined(BLINKER_PRO_SIM7020) || \ defined(BLINKER_PRO_AIR202) || defined(BLINKER_MQTT_AUTO) || \ defined(BLINKER_PRO_ESP) || defined(BLINKER_LOWPOWER_AIR202) || \ - defined(BLINKER_WIFI_SUBDEVICE) + defined(BLINKER_WIFI_SUBDEVICE) || defined(BLINKER_QRCODE_NBIOT_SIM7020) void BlinkerApi::setTimezone(float tz) { _timezone = tz; @@ -4819,9 +4859,9 @@ float BlinkerApi::gps(b_gps_t axis) #if (!defined(BLINKER_NBIOT_SIM7020) && !defined(BLINKER_GPRS_AIR202) && \ !defined(BLINKER_PRO_SIM7020) && !defined(BLINKER_PRO_AIR202) && \ - !defined(BLINKER_LOWPOWER_AIR202)) + !defined(BLINKER_LOWPOWER_AIR202) && !defined(BLINKER_QRCODE_NBIOT_SIM7020)) time_t now_ntp = ::time(nullptr); - #elif defined(BLINKER_NBIOT_SIM7020) || defined(BLINKER_PRO_SIM7020) + #elif defined(BLINKER_NBIOT_SIM7020) || defined(BLINKER_PRO_SIM7020) || defined(BLINKER_QRCODE_NBIOT_SIM7020) BlinkerSIM7020 BLINKER_SIM7020; BLINKER_SIM7020.setStream(*stream, isHWS, listenFunc); if (!BLINKER_SIM7020.getSNTP(getTimezone())) return -1; @@ -4884,9 +4924,10 @@ float BlinkerApi::gps(b_gps_t axis) // { #if (!defined(BLINKER_NBIOT_SIM7020) && !defined(BLINKER_GPRS_AIR202) && \ !defined(BLINKER_PRO_SIM7020) && !defined(BLINKER_PRO_AIR202) && \ - !defined(BLINKER_LOWPOWER_AIR202)) + !defined(BLINKER_LOWPOWER_AIR202) && !defined(BLINKER_QRCODE_NBIOT_SIM7020)) time_t now_ntp = ::time(nullptr); - #elif defined(BLINKER_NBIOT_SIM7020) || defined(BLINKER_PRO_SIM7020) + #elif defined(BLINKER_NBIOT_SIM7020) || defined(BLINKER_PRO_SIM7020) || \ + defined(BLINKER_QRCODE_NBIOT_SIM7020) BlinkerSIM7020 BLINKER_SIM7020; BLINKER_SIM7020.setStream(*stream, isHWS, listenFunc); if (!BLINKER_SIM7020.getSNTP(getTimezone())) return -1; @@ -4948,9 +4989,10 @@ float BlinkerApi::gps(b_gps_t axis) // { #if (!defined(BLINKER_NBIOT_SIM7020) && !defined(BLINKER_GPRS_AIR202) && \ !defined(BLINKER_PRO_SIM7020) && !defined(BLINKER_PRO_AIR202) && \ - !defined(BLINKER_LOWPOWER_AIR202)) + !defined(BLINKER_LOWPOWER_AIR202) && !defined(BLINKER_QRCODE_NBIOT_SIM7020)) time_t now_ntp = ::time(nullptr); - #elif defined(BLINKER_NBIOT_SIM7020) || defined(BLINKER_PRO_SIM7020) + #elif defined(BLINKER_NBIOT_SIM7020) || defined(BLINKER_PRO_SIM7020) || \ + defined(BLINKER_QRCODE_NBIOT_SIM7020) BlinkerSIM7020 BLINKER_SIM7020; BLINKER_SIM7020.setStream(*stream, isHWS, listenFunc); if (!BLINKER_SIM7020.getSNTP(getTimezone())) return -1; @@ -5013,9 +5055,10 @@ float BlinkerApi::gps(b_gps_t axis) // { #if (!defined(BLINKER_NBIOT_SIM7020) && !defined(BLINKER_GPRS_AIR202) && \ !defined(BLINKER_PRO_SIM7020) && !defined(BLINKER_PRO_AIR202) && \ - !defined(BLINKER_LOWPOWER_AIR202)) + !defined(BLINKER_LOWPOWER_AIR202) && !defined(BLINKER_QRCODE_NBIOT_SIM7020)) time_t now_ntp = ::time(nullptr); - #elif defined(BLINKER_NBIOT_SIM7020) || defined(BLINKER_PRO_SIM7020) + #elif defined(BLINKER_NBIOT_SIM7020) || defined(BLINKER_PRO_SIM7020) || \ + defined(BLINKER_QRCODE_NBIOT_SIM7020) BlinkerSIM7020 BLINKER_SIM7020; BLINKER_SIM7020.setStream(*stream, isHWS, listenFunc); if (!BLINKER_SIM7020.getSNTP(getTimezone())) return -1; @@ -5077,9 +5120,10 @@ float BlinkerApi::gps(b_gps_t axis) // { #if (!defined(BLINKER_NBIOT_SIM7020) && !defined(BLINKER_GPRS_AIR202) && \ !defined(BLINKER_PRO_SIM7020) && !defined(BLINKER_PRO_AIR202) && \ - !defined(BLINKER_LOWPOWER_AIR202)) + !defined(BLINKER_LOWPOWER_AIR202) && !defined(BLINKER_QRCODE_NBIOT_SIM7020)) time_t now_ntp = ::time(nullptr); - #elif defined(BLINKER_NBIOT_SIM7020) || defined(BLINKER_PRO_SIM7020) + #elif defined(BLINKER_NBIOT_SIM7020) || defined(BLINKER_PRO_SIM7020) || \ + defined(BLINKER_QRCODE_NBIOT_SIM7020) BlinkerSIM7020 BLINKER_SIM7020; BLINKER_SIM7020.setStream(*stream, isHWS, listenFunc); if (!BLINKER_SIM7020.getSNTP(getTimezone())) return -1; @@ -5142,9 +5186,10 @@ float BlinkerApi::gps(b_gps_t axis) // { #if (!defined(BLINKER_NBIOT_SIM7020) && !defined(BLINKER_GPRS_AIR202) && \ !defined(BLINKER_PRO_SIM7020) && !defined(BLINKER_PRO_AIR202) && \ - !defined(BLINKER_LOWPOWER_AIR202)) + !defined(BLINKER_LOWPOWER_AIR202) && !defined(BLINKER_QRCODE_NBIOT_SIM7020)) time_t now_ntp = ::time(nullptr); - #elif defined(BLINKER_NBIOT_SIM7020) || defined(BLINKER_PRO_SIM7020) + #elif defined(BLINKER_NBIOT_SIM7020) || defined(BLINKER_PRO_SIM7020) || \ + defined(BLINKER_QRCODE_NBIOT_SIM7020) BlinkerSIM7020 BLINKER_SIM7020; BLINKER_SIM7020.setStream(*stream, isHWS, listenFunc); if (!BLINKER_SIM7020.getSNTP(getTimezone())) return -1; @@ -5207,9 +5252,10 @@ float BlinkerApi::gps(b_gps_t axis) // { #if (!defined(BLINKER_NBIOT_SIM7020) && !defined(BLINKER_GPRS_AIR202) && \ !defined(BLINKER_PRO_SIM7020) && !defined(BLINKER_PRO_AIR202) && \ - !defined(BLINKER_LOWPOWER_AIR202)) + !defined(BLINKER_LOWPOWER_AIR202) && !defined(BLINKER_QRCODE_NBIOT_SIM7020)) time_t now_ntp = ::time(nullptr); - #elif defined(BLINKER_NBIOT_SIM7020) || defined(BLINKER_PRO_SIM7020) + #elif defined(BLINKER_NBIOT_SIM7020) || defined(BLINKER_PRO_SIM7020) || \ + defined(BLINKER_QRCODE_NBIOT_SIM7020) BlinkerSIM7020 BLINKER_SIM7020; BLINKER_SIM7020.setStream(*stream, isHWS, listenFunc); if (!BLINKER_SIM7020.getSNTP(getTimezone())) return -1; @@ -5272,9 +5318,10 @@ float BlinkerApi::gps(b_gps_t axis) // { #if (!defined(BLINKER_NBIOT_SIM7020) && !defined(BLINKER_GPRS_AIR202) && \ !defined(BLINKER_PRO_SIM7020) && !defined(BLINKER_PRO_AIR202) && \ - !defined(BLINKER_LOWPOWER_AIR202)) + !defined(BLINKER_LOWPOWER_AIR202) && !defined(BLINKER_QRCODE_NBIOT_SIM7020)) time_t now_ntp = ::time(nullptr); - #elif defined(BLINKER_NBIOT_SIM7020) || defined(BLINKER_PRO_SIM7020) + #elif defined(BLINKER_NBIOT_SIM7020) || defined(BLINKER_PRO_SIM7020) || \ + defined(BLINKER_QRCODE_NBIOT_SIM7020) BlinkerSIM7020 BLINKER_SIM7020; BLINKER_SIM7020.setStream(*stream, isHWS, listenFunc); if (!BLINKER_SIM7020.getSNTP(getTimezone())) return -1; @@ -5341,9 +5388,10 @@ float BlinkerApi::gps(b_gps_t axis) #if (!defined(BLINKER_NBIOT_SIM7020) && !defined(BLINKER_GPRS_AIR202) && \ !defined(BLINKER_PRO_SIM7020) && !defined(BLINKER_PRO_AIR202) && \ - !defined(BLINKER_LOWPOWER_AIR202)) + !defined(BLINKER_LOWPOWER_AIR202) && !defined(BLINKER_QRCODE_NBIOT_SIM7020)) time_t now_ntp = ::time(nullptr); - #elif defined(BLINKER_NBIOT_SIM7020) || defined(BLINKER_PRO_SIM7020) + #elif defined(BLINKER_NBIOT_SIM7020) || defined(BLINKER_PRO_SIM7020) || \ + defined(BLINKER_QRCODE_NBIOT_SIM7020) BlinkerSIM7020 BLINKER_SIM7020; BLINKER_SIM7020.setStream(*stream, isHWS, listenFunc); if (!BLINKER_SIM7020.getSNTP(getTimezone())) return -1; @@ -5419,9 +5467,10 @@ float BlinkerApi::gps(b_gps_t axis) // { #if (!defined(BLINKER_NBIOT_SIM7020) && !defined(BLINKER_GPRS_AIR202) && \ !defined(BLINKER_PRO_SIM7020) && !defined(BLINKER_PRO_AIR202) && \ - !defined(BLINKER_LOWPOWER_AIR202)) + !defined(BLINKER_LOWPOWER_AIR202) && !defined(BLINKER_QRCODE_NBIOT_SIM7020)) time_t now_ntp = ::time(nullptr); - #elif defined(BLINKER_NBIOT_SIM7020) || defined(BLINKER_PRO_SIM7020) + #elif defined(BLINKER_NBIOT_SIM7020) || defined(BLINKER_PRO_SIM7020) || \ + defined(BLINKER_QRCODE_NBIOT_SIM7020) BlinkerSIM7020 BLINKER_SIM7020; BLINKER_SIM7020.setStream(*stream, isHWS, listenFunc); if (!BLINKER_SIM7020.getSNTP(getTimezone())) return -1; @@ -5501,7 +5550,7 @@ float BlinkerApi::gps(b_gps_t axis) defined(BLINKER_NBIOT_SIM7020) || defined(BLINKER_GPRS_AIR202) || \ defined(BLINKER_PRO_SIM7020) || defined(BLINKER_PRO_AIR202) || \ defined(BLINKER_MQTT_AUTO) || defined(BLINKER_PRO_ESP) || \ - defined(BLINKER_LOWPOWER_AIR202) + defined(BLINKER_LOWPOWER_AIR202) || defined(BLINKER_QRCODE_NBIOT_SIM7020) String data = BLINKER_F("{\"deviceName\":\""); data += BProto::deviceName(); data += BLINKER_F("\",\"key\":\""); @@ -5545,7 +5594,7 @@ float BlinkerApi::gps(b_gps_t axis) defined(BLINKER_NBIOT_SIM7020) || defined(BLINKER_GPRS_AIR202) || \ defined(BLINKER_PRO_SIM7020) || defined(BLINKER_PRO_AIR202) || \ defined(BLINKER_MQTT_AUTO) || defined(BLINKER_PRO_ESP) || \ - defined(BLINKER_LOWPOWER_AIR202) + defined(BLINKER_LOWPOWER_AIR202) || defined(BLINKER_QRCODE_NBIOT_SIM7020) String data = BLINKER_F("{\"deviceName\":\""); data += BProto::deviceName(); data += BLINKER_F("\",\"key\":\""); @@ -5594,7 +5643,7 @@ float BlinkerApi::gps(b_gps_t axis) defined(BLINKER_NBIOT_SIM7020) || defined(BLINKER_GPRS_AIR202) || \ defined(BLINKER_PRO_SIM7020) || defined(BLINKER_PRO_AIR202) || \ defined(BLINKER_MQTT_AUTO) || defined(BLINKER_PRO_ESP) || \ - defined(BLINKER_LOWPOWER_AIR202) + defined(BLINKER_LOWPOWER_AIR202) || defined(BLINKER_QRCODE_NBIOT_SIM7020) String data = BLINKER_F("{\"deviceName\":\""); data += BProto::deviceName(); data += BLINKER_F("\",\"key\":\""); @@ -5633,7 +5682,7 @@ float BlinkerApi::gps(b_gps_t axis) defined(BLINKER_NBIOT_SIM7020) || defined(BLINKER_GPRS_AIR202) || \ defined(BLINKER_PRO_SIM7020) || defined(BLINKER_PRO_AIR202) || \ defined(BLINKER_MQTT_AUTO) || defined(BLINKER_PRO_ESP) || \ - defined(BLINKER_LOWPOWER_AIR202) + defined(BLINKER_LOWPOWER_AIR202) || defined(BLINKER_QRCODE_NBIOT_SIM7020) String data = BLINKER_F("{\"deviceName\":\""); data += BProto::deviceName(); data += BLINKER_F("\",\"key\":\""); @@ -5672,7 +5721,7 @@ float BlinkerApi::gps(b_gps_t axis) defined(BLINKER_NBIOT_SIM7020) || defined(BLINKER_GPRS_AIR202) || \ defined(BLINKER_PRO_SIM7020) || defined(BLINKER_PRO_AIR202) || \ defined(BLINKER_MQTT_AUTO) || defined(BLINKER_PRO_ESP) || \ - defined(BLINKER_LOWPOWER_AIR202) + defined(BLINKER_LOWPOWER_AIR202) || defined(BLINKER_QRCODE_NBIOT_SIM7020) String data = BLINKER_F("{\"deviceName\":\""); data += BProto::deviceName(); data += BLINKER_F("\",\"key\":\""); @@ -5732,7 +5781,7 @@ float BlinkerApi::gps(b_gps_t axis) defined(BLINKER_NBIOT_SIM7020) || defined(BLINKER_GPRS_AIR202) || \ defined(BLINKER_PRO_SIM7020) || defined(BLINKER_PRO_AIR202) || \ defined(BLINKER_MQTT_AUTO) || defined(BLINKER_PRO_ESP) || \ - defined(BLINKER_LOWPOWER_AIR202) + defined(BLINKER_LOWPOWER_AIR202) || defined(BLINKER_QRCODE_NBIOT_SIM7020) data += BLINKER_F("device="); data += BProto::deviceName(); data += BLINKER_F("&key="); @@ -5781,7 +5830,7 @@ float BlinkerApi::gps(b_gps_t axis) defined(BLINKER_NBIOT_SIM7020) || defined(BLINKER_GPRS_AIR202) || \ defined(BLINKER_PRO_SIM7020) || defined(BLINKER_PRO_AIR202) || \ defined(BLINKER_MQTT_AUTO) || defined(BLINKER_PRO_ESP) || \ - defined(BLINKER_LOWPOWER_AIR202) + defined(BLINKER_LOWPOWER_AIR202) || defined(BLINKER_QRCODE_NBIOT_SIM7020) data += BLINKER_F("device="); data += BProto::deviceName(); data += BLINKER_F("&key="); @@ -5830,7 +5879,7 @@ float BlinkerApi::gps(b_gps_t axis) defined(BLINKER_NBIOT_SIM7020) || defined(BLINKER_GPRS_AIR202) || \ defined(BLINKER_PRO_SIM7020) || defined(BLINKER_PRO_AIR202) || \ defined(BLINKER_MQTT_AUTO) || defined(BLINKER_PRO_ESP) || \ - defined(BLINKER_LOWPOWER_AIR202) + defined(BLINKER_LOWPOWER_AIR202) || defined(BLINKER_QRCODE_NBIOT_SIM7020) data += BLINKER_F("device="); data += BProto::deviceName(); data += BLINKER_F("&key="); @@ -5879,7 +5928,7 @@ float BlinkerApi::gps(b_gps_t axis) defined(BLINKER_NBIOT_SIM7020) || defined(BLINKER_GPRS_AIR202) || \ defined(BLINKER_PRO_SIM7020) || defined(BLINKER_PRO_AIR202) || \ defined(BLINKER_MQTT_AUTO) || defined(BLINKER_PRO_ESP) || \ - defined(BLINKER_LOWPOWER_AIR202) + defined(BLINKER_LOWPOWER_AIR202) || defined(BLINKER_QRCODE_NBIOT_SIM7020) data += BLINKER_F("device="); data += BProto::deviceName(); data += BLINKER_F("&key="); @@ -5929,7 +5978,7 @@ float BlinkerApi::gps(b_gps_t axis) defined(BLINKER_NBIOT_SIM7020) || defined(BLINKER_GPRS_AIR202) || \ defined(BLINKER_PRO_SIM7020) || defined(BLINKER_PRO_AIR202) || \ defined(BLINKER_MQTT_AUTO) || defined(BLINKER_PRO_ESP) || \ - defined(BLINKER_LOWPOWER_AIR202) + defined(BLINKER_LOWPOWER_AIR202) || defined(BLINKER_QRCODE_NBIOT_SIM7020) data += BLINKER_F("device="); data += BProto::deviceName(); data += BLINKER_F("&key="); @@ -5978,7 +6027,7 @@ float BlinkerApi::gps(b_gps_t axis) defined(BLINKER_NBIOT_SIM7020) || defined(BLINKER_GPRS_AIR202) || \ defined(BLINKER_PRO_SIM7020) || defined(BLINKER_PRO_AIR202) || \ defined(BLINKER_MQTT_AUTO) || defined(BLINKER_PRO_ESP) || \ - defined(BLINKER_LOWPOWER_AIR202) + defined(BLINKER_LOWPOWER_AIR202) || defined(BLINKER_QRCODE_NBIOT_SIM7020) data += BLINKER_F("device="); data += BProto::deviceName(); data += BLINKER_F("&key="); @@ -6106,7 +6155,7 @@ float BlinkerApi::gps(b_gps_t axis) #if (!defined(BLINKER_NBIOT_SIM7020) && !defined(BLINKER_GPRS_AIR202) && \ !defined(BLINKER_PRO_SIM7020) && !defined(BLINKER_PRO_AIR202) && \ - !defined(BLINKER_LOWPOWER_AIR202)) + !defined(BLINKER_LOWPOWER_AIR202) && !defined(BLINKER_QRCODE_NBIOT_SIM7020)) void BlinkerApi::loadTimer() { BLINKER_LOG(BLINKER_F( @@ -6852,7 +6901,7 @@ float BlinkerApi::gps(b_gps_t axis) #if (!defined(BLINKER_NBIOT_SIM7020) && !defined(BLINKER_GPRS_AIR202) && \ !defined(BLINKER_PRO_SIM7020) && !defined(BLINKER_PRO_AIR202) && \ - !defined(BLINKER_LOWPOWER_AIR202)) + !defined(BLINKER_LOWPOWER_AIR202) && !defined(BLINKER_QRCODE_NBIOT_SIM7020)) bool BlinkerApi::autoPull() { #if !defined(BLINKER_WIFI_SUBDEVICE) @@ -7040,7 +7089,7 @@ float BlinkerApi::gps(b_gps_t axis) #if (!defined(BLINKER_NBIOT_SIM7020) && !defined(BLINKER_GPRS_AIR202) && \ !defined(BLINKER_PRO_SIM7020) && !defined(BLINKER_PRO_AIR202) && \ - !defined(BLINKER_LOWPOWER_AIR202)) + !defined(BLINKER_LOWPOWER_AIR202) && !defined(BLINKER_QRCODE_NBIOT_SIM7020)) void BlinkerApi::loadOTA() { @@ -7334,7 +7383,8 @@ float BlinkerApi::gps(b_gps_t axis) } #if !defined(BLINKER_GPRS_AIR202) && !defined(BLINKER_NBIOT_SIM7020) && \ - !defined(BLINKER_PRO_SIM7020) && !defined(BLINKER_PRO_AIR202) + !defined(BLINKER_PRO_SIM7020) && !defined(BLINKER_PRO_AIR202) && \ + !defined(BLINKER_QRCODE_NBIOT_SIM7020) void BlinkerApi::miotPrint(String & _msg) { BLINKER_LOG_ALL(BLINKER_F("response to MIOT: "), _msg); @@ -8368,11 +8418,11 @@ char * BlinkerApi::widgetName_tab(uint8_t num) defined(BLINKER_GPRS_AIR202) || defined(BLINKER_PRO_SIM7020) || \ defined(BLINKER_PRO_AIR202) || defined(BLINKER_MQTT_AUTO) || \ defined(BLINKER_PRO_ESP) || defined(BLINKER_LOWPOWER_AIR202) || \ - defined(BLINKER_WIFI_SUBDEVICE) + defined(BLINKER_WIFI_SUBDEVICE) || defined(BLINKER_QRCODE_NBIOT_SIM7020) #if (!defined(BLINKER_NBIOT_SIM7020) && !defined(BLINKER_GPRS_AIR202) && \ !defined(BLINKER_PRO_SIM7020) && !defined(BLINKER_PRO_AIR202) && \ - !defined(BLINKER_LOWPOWER_AIR202)) + !defined(BLINKER_LOWPOWER_AIR202) && !defined(BLINKER_QRCODE_NBIOT_SIM7020)) void BlinkerApi::beginAuto() { @@ -10110,7 +10160,7 @@ char * BlinkerApi::widgetName_tab(uint8_t num) #if (!defined(BLINKER_NBIOT_SIM7020) && !defined(BLINKER_GPRS_AIR202) && \ !defined(BLINKER_PRO_SIM7020) && !defined(BLINKER_PRO_AIR202) && \ - !defined(BLINKER_LOWPOWER_AIR202)) + !defined(BLINKER_LOWPOWER_AIR202) && !defined(BLINKER_QRCODE_NBIOT_SIM7020)) void BlinkerApi::autoStart() { BLINKER_LOG_ALL(BLINKER_F("_______autoStart_______")); @@ -10333,7 +10383,7 @@ char * BlinkerApi::widgetName_tab(uint8_t num) json_parse(_array); #if (!defined(BLINKER_NBIOT_SIM7020) && !defined(BLINKER_GPRS_AIR202) && \ !defined(BLINKER_PRO_SIM7020) && !defined(BLINKER_PRO_AIR202) && \ - !defined(BLINKER_LOWPOWER_AIR202)) + !defined(BLINKER_LOWPOWER_AIR202) && !defined(BLINKER_QRCODE_NBIOT_SIM7020)) timerManager(_array, true); #endif @@ -10678,7 +10728,7 @@ char * BlinkerApi::widgetName_tab(uint8_t num) #if (!defined(BLINKER_NBIOT_SIM7020) && !defined(BLINKER_GPRS_AIR202) && \ !defined(BLINKER_PRO_SIM7020) && !defined(BLINKER_PRO_AIR202) && \ - !defined(BLINKER_LOWPOWER_AIR202)) + !defined(BLINKER_LOWPOWER_AIR202) && !defined(BLINKER_QRCODE_NBIOT_SIM7020)) // String BlinkerApi::postServer(const String & url, const String & host, int port, const String & msg) // { @@ -11805,7 +11855,7 @@ char * BlinkerApi::widgetName_tab(uint8_t num) defined(BLINKER_WIFI_GATEWAY) || defined(BLINKER_NBIOT_SIM7020) || \ defined(BLINKER_PRO_SIM7020) || defined(BLINKER_PRO_AIR202) || \ defined(BLINKER_MQTT_AUTO) || defined(BLINKER_PRO_ESP) || \ - defined(BLINKER_WIFI_SUBDEVICE) + defined(BLINKER_WIFI_SUBDEVICE) || defined(BLINKER_QRCODE_NBIOT_SIM7020) void BlinkerApi::aliParse(const String & _data) { @@ -14342,7 +14392,8 @@ char * BlinkerApi::widgetName_tab(uint8_t num) } #endif -#if defined(BLINKER_NBIOT_SIM7020) || defined(BLINKER_PRO_SIM7020) +#if defined(BLINKER_NBIOT_SIM7020) || defined(BLINKER_PRO_SIM7020) || \ + defined(BLINKER_QRCODE_NBIOT_SIM7020) bool BlinkerApi::powerCheck() { BlinkerSIM7020 BLINKER_SIM7020; diff --git a/src/Blinker/BlinkerApiBase.h b/src/Blinker/BlinkerApiBase.h index fba5fc0b..f1985c8a 100644 --- a/src/Blinker/BlinkerApiBase.h +++ b/src/Blinker/BlinkerApiBase.h @@ -172,7 +172,8 @@ class BlinkerWidgets_table defined(BLINKER_NBIOT_SIM7020) || defined(BLINKER_GPRS_AIR202) || \ defined(BLINKER_PRO_SIM7020) || defined(BLINKER_PRO_AIR202) || \ defined(BLINKER_MQTT_AUTO) || defined(BLINKER_PRO_ESP) || \ - defined(BLINKER_LOWPOWER_AIR202) || defined(BLINKER_WIFI_SUBDEVICE) + defined(BLINKER_LOWPOWER_AIR202) || defined(BLINKER_WIFI_SUBDEVICE) || \ + defined(BLINKER_QRCODE_NBIOT_SIM7020) class BlinkerBridge_key { public : diff --git a/src/Blinker/BlinkerAuto.h b/src/Blinker/BlinkerAuto.h index f9e2fede..9025836d 100644 --- a/src/Blinker/BlinkerAuto.h +++ b/src/Blinker/BlinkerAuto.h @@ -6,7 +6,8 @@ defined(BLINKER_AT_MQTT) || defined(BLINKER_WIFI_GATEWAY) || \ defined(BLINKER_NBIOT_SIM7020) || defined(BLINKER_PRO_SIM7020) || \ defined(BLINKER_PRO_AIR202) || defined(BLINKER_MQTT_AUTO) || \ - defined(BLINKER_PRO_ESP) || defined(BLINKER_WIFI_SUBDEVICE))) + defined(BLINKER_PRO_ESP) || defined(BLINKER_WIFI_SUBDEVICE) || \ + defined(BLINKER_QRCODE_NBIOT_SIM7020))) #if ARDUINO >= 100 #include diff --git a/src/Blinker/BlinkerConfig.h b/src/Blinker/BlinkerConfig.h index 226c21f9..283b7492 100644 --- a/src/Blinker/BlinkerConfig.h +++ b/src/Blinker/BlinkerConfig.h @@ -122,7 +122,7 @@ #else #if defined(BLINKER_PRO_SIM7020) || defined(BLINKER_PRO_AIR202) || \ defined(BLINKER_NBIOT_SIM7020) || defined(BLINKER_GPRS_AIR202) || \ - defined(BLINKER_LOWPOWER_AIR202) + defined(BLINKER_LOWPOWER_AIR202) || defined(BLINKER_QRCODE_NBIOT_SIM7020) #define BLINKER_MAX_SEND_SIZE 512 #else #define BLINKER_MAX_SEND_SIZE 128 @@ -143,7 +143,7 @@ #else #if defined(BLINKER_PRO_SIM7020) || defined(BLINKER_PRO_AIR202) || \ defined(BLINKER_NBIOT_SIM7020) || defined(BLINKER_GPRS_AIR202) || \ - defined(BLINKER_LOWPOWER_AIR202) + defined(BLINKER_LOWPOWER_AIR202) || defined(BLINKER_QRCODE_NBIOT_SIM7020) #define BLINKER_MAX_SEND_BUFFER_SIZE 512 #else #define BLINKER_MAX_SEND_BUFFER_SIZE 128 @@ -1370,7 +1370,7 @@ Success--[AT+MIPLDISCOVERRSP=0,22903,1,24,"5850;5851;5852;5853;5750"] defined(BLINKER_GPRS_AIR202) || defined(BLINKER_PRO_SIM7020) || \ defined(BLINKER_PRO_AIR202) || defined(BLINKER_MQTT_AUTO) || \ defined(BLINKER_PRO_ESP) || defined(BLINKER_LOWPOWER_AIR202) || \ - defined(BLINKER_WIFI_SUBDEVICE) + defined(BLINKER_WIFI_SUBDEVICE) || defined(BLINKER_QRCODE_NBIOT_SIM7020) #define BLINKER_CMD_SMS_NUMBER 1 #define BLINKER_CMD_PUSH_NUMBER 2 @@ -1440,7 +1440,8 @@ Success--[AT+MIPLDISCOVERRSP=0,22903,1,24,"5850;5851;5852;5853;5750"] defined(BLINKER_GPRS_AIR202) || defined(BLINKER_NBIOT_SIM7020) || \ defined(BLINKER_PRO_SIM7020) || defined(BLINKER_PRO_AIR202) || \ defined(BLINKER_MQTT_AUTO) || defined(BLINKER_PRO_ESP) || \ - defined(BLINKER_LOWPOWER_AIR202) || defined(BLINKER_WIFI_SUBDEVICE) + defined(BLINKER_LOWPOWER_AIR202) || defined(BLINKER_WIFI_SUBDEVICE) || \ + defined(BLINKER_QRCODE_NBIOT_SIM7020) #define BLINKER_MQTT_BORKER_ALIYUN "aliyun" #define BLINKER_MQTT_ALIYUN_HOST "public.iot-as-mqtt.cn-shanghai.aliyuncs.com" @@ -1621,7 +1622,8 @@ Success--[AT+MIPLDISCOVERRSP=0,22903,1,24,"5850;5851;5852;5853;5750"] defined(BLINKER_NBIOT_SIM7020) || defined(BLINKER_PRO_SIM7020) || \ defined(BLINKER_PRO_AIR202) || defined(BLINKER_MQTT_AUTO) || \ defined(BLINKER_PRO_ESP) || defined(BLINKER_LOWPOWER_AIR202) || \ - defined(BLINKER_WIFI_GATEWAY) || defined(BLINKER_WIFI_SUBDEVICE) + defined(BLINKER_WIFI_GATEWAY) || defined(BLINKER_WIFI_SUBDEVICE) || \ + defined(BLINKER_QRCODE_NBIOT_SIM7020) #ifndef BLINKER_BUTTON_PIN #define BLINKER_BUTTON_PIN 2 @@ -1930,7 +1932,7 @@ Success--[AT+MIPLDISCOVERRSP=0,22903,1,24,"5850;5851;5852;5853;5750"] #endif #if defined(BLINKER_NBIOT_SIM7020) || defined(BLINKER_PRO_SIM7020) || \ - defined(BLINKER_PRO_AIR202) + defined(BLINKER_PRO_AIR202) || defined(BLINKER_QRCODE_NBIOT_SIM7020) // http://www.simcom.com/upload/file/1547183713.pdf HTTP // http://www.simcom.com/upload/file/1547183663.pdf MQTT // http://www.simcom.com/upload/file/1547177595.pdf AT diff --git a/src/Blinker/BlinkerProtocol.h b/src/Blinker/BlinkerProtocol.h index b94b19a5..d293ceb3 100644 --- a/src/Blinker/BlinkerProtocol.h +++ b/src/Blinker/BlinkerProtocol.h @@ -72,11 +72,13 @@ class BlinkerProtocol defined(BLINKER_WIFI_GATEWAY) || defined(BLINKER_NBIOT_SIM7020) || \ defined(BLINKER_GPRS_AIR202) || defined(BLINKER_PRO_SIM7020) || \ defined(BLINKER_PRO_AIR202) || defined(BLINKER_MQTT_AUTO) || \ - defined(BLINKER_PRO_ESP) || defined(BLINKER_WIFI_SUBDEVICE) + defined(BLINKER_PRO_ESP) || defined(BLINKER_WIFI_SUBDEVICE) || \ + defined(BLINKER_QRCODE_NBIOT_SIM7020) int aliPrint(const String & data) { return isInit ? conn->aliPrint(data) : false; } int duerPrint(const String & data, bool report = false) { return isInit ? conn->duerPrint(data, report) : false; } #if !defined(BLINKER_GPRS_AIR202) && !defined(BLINKER_NBIOT_SIM7020) && \ - !defined(BLINKER_PRO_SIM7020) && !defined(BLINKER_PRO_AIR202) + !defined(BLINKER_PRO_SIM7020) && !defined(BLINKER_PRO_AIR202) && \ + !defined(BLINKER_QRCODE_NBIOT_SIM7020) int miPrint(const String & data) { return isInit ? conn->miPrint(data) : false; } #endif // void ping() { if (isInit) conn->ping(); } @@ -93,7 +95,7 @@ class BlinkerProtocol defined(BLINKER_GPRS_AIR202) || defined(BLINKER_NBIOT_SIM7020) || \ defined(BLINKER_PRO_SIM7020) || defined(BLINKER_PRO_AIR202) || \ defined(BLINKER_MQTT_AUTO) || defined(BLINKER_PRO_ESP) || \ - defined(BLINKER_WIFI_SUBDEVICE) + defined(BLINKER_WIFI_SUBDEVICE) || defined(BLINKER_QRCODE_NBIOT_SIM7020) int toServer(char * data) { return isInit ? conn->toServer(data) : false; } char * deviceName() { if (isInit) return conn->deviceName(); else return ""; } char * authKey() { if (isInit) return conn->authKey(); else return ""; } @@ -122,10 +124,17 @@ class BlinkerProtocol void begin(const char* _key, const char* _type) { conn->begin(_key, _type); } #endif #elif defined(BLINKER_GPRS_AIR202) || defined(BLINKER_NBIOT_SIM7020) || \ - defined(BLINKER_PRO_SIM7020) || defined(BLINKER_PRO_AIR202) + defined(BLINKER_PRO_SIM7020) || defined(BLINKER_PRO_AIR202) || \ + defined(BLINKER_QRCODE_NBIOT_SIM7020) int deviceRegister(){ return conn->deviceRegister(); } - void begin(const char* _deviceType, String _imei) - { conn->begin(_deviceType, _imei); } + + #if defined(BLINKER_QRCODE_NBIOT_SIM7020) + void begin(const char* _authKey, const char* _deviceType, String _imei) + { conn->begin(_authKey, _deviceType, _imei); } + #else + void begin(const char* _deviceType, String _imei) + { conn->begin(_deviceType, _imei); } + #endif #if defined(BLINKER_PRO_SIM7020) || defined(BLINKER_PRO_AIR202) int authCheck() { return conn->authCheck(); } @@ -203,7 +212,8 @@ class BlinkerProtocol bool checkAliAvail() { return conn->aligenieAvail(); } bool checkDuerAvail() { return conn->duerAvail(); } #if !defined(BLINKER_GPRS_AIR202) && !defined(BLINKER_NBIOT_SIM7020) && \ - !defined(BLINKER_PRO_SIM7020) && !defined(BLINKER_PRO_AIR202) + !defined(BLINKER_PRO_SIM7020) && !defined(BLINKER_PRO_AIR202) && \ + !defined(BLINKER_QRCODE_NBIOT_SIM7020) bool checkMIOTAvail() { return conn->miAvail(); } #endif #endif diff --git a/src/Blinker/BlinkerStream.h b/src/Blinker/BlinkerStream.h index a4d80b05..b23411b8 100644 --- a/src/Blinker/BlinkerStream.h +++ b/src/Blinker/BlinkerStream.h @@ -37,11 +37,13 @@ class BlinkerStream defined(BLINKER_WIFI_GATEWAY) || defined(BLINKER_NBIOT_SIM7020) || \ defined(BLINKER_GPRS_AIR202) || defined(BLINKER_PRO_SIM7020) || \ defined(BLINKER_PRO_AIR202) || defined(BLINKER_MQTT_AUTO) || \ - defined(BLINKER_PRO_ESP) || defined(BLINKER_WIFI_SUBDEVICE) + defined(BLINKER_PRO_ESP) || defined(BLINKER_WIFI_SUBDEVICE) || \ + defined(BLINKER_QRCODE_NBIOT_SIM7020) virtual int aliPrint(const String & data) = 0; virtual int duerPrint(const String & data, bool report = false) = 0; #if !defined(BLINKER_GPRS_AIR202) && !defined(BLINKER_NBIOT_SIM7020) && \ - !defined(BLINKER_PRO_SIM7020) && !defined(BLINKER_PRO_AIR202) + !defined(BLINKER_PRO_SIM7020) && !defined(BLINKER_PRO_AIR202) && \ + !defined(BLINKER_QRCODE_NBIOT_SIM7020) virtual int miPrint(const String & data) = 0; #endif // virtual void ping() = 0; @@ -52,7 +54,8 @@ class BlinkerStream virtual int aligenieAvail() = 0; virtual int duerAvail() = 0; #if !defined(BLINKER_GPRS_AIR202) && !defined(BLINKER_NBIOT_SIM7020) && \ - !defined(BLINKER_PRO_SIM7020) && !defined(BLINKER_PRO_AIR202) + !defined(BLINKER_PRO_SIM7020) && !defined(BLINKER_PRO_AIR202) && \ + !defined(BLINKER_QRCODE_NBIOT_SIM7020) virtual int miAvail() = 0; #endif virtual int needFreshShare() = 0; @@ -64,7 +67,7 @@ class BlinkerStream defined(BLINKER_GPRS_AIR202) || defined(BLINKER_NBIOT_SIM7020) || \ defined(BLINKER_PRO_SIM7020) || defined(BLINKER_PRO_AIR202) || \ defined(BLINKER_MQTT_AUTO) || defined(BLINKER_PRO_ESP) || \ - defined(BLINKER_WIFI_SUBDEVICE) + defined(BLINKER_WIFI_SUBDEVICE) || defined(BLINKER_QRCODE_NBIOT_SIM7020) virtual int toServer(char * data) = 0; virtual char * deviceName() = 0; virtual char * authKey() = 0; @@ -115,9 +118,15 @@ class BlinkerStream virtual void begin(const char* auth, const char* type) = 0; #endif #elif defined(BLINKER_GPRS_AIR202) || defined(BLINKER_NBIOT_SIM7020) || \ - defined(BLINKER_PRO_SIM7020) || defined(BLINKER_PRO_AIR202) + defined(BLINKER_PRO_SIM7020) || defined(BLINKER_PRO_AIR202) || \ + defined(BLINKER_QRCODE_NBIOT_SIM7020) virtual int deviceRegister() = 0; - virtual void begin(const char* _type, String _imei) = 0; + + #if defined(BLINKER_QRCODE_NBIOT_SIM7020) + virtual void begin(const char* _auth, const char* _type, String _imei) = 0; + #else + virtual void begin(const char* _type, String _imei) = 0; + #endif #if defined(BLINKER_PRO_SIM7020) || defined(BLINKER_PRO_AIR202) virtual int authCheck() = 0; diff --git a/src/Blinker/BlinkerUtility.h b/src/Blinker/BlinkerUtility.h index c0aae9fd..f45ce1a6 100644 --- a/src/Blinker/BlinkerUtility.h +++ b/src/Blinker/BlinkerUtility.h @@ -66,7 +66,7 @@ extern "C" { defined(BLINKER_NBIOT_SIM7020) || defined(BLINKER_GPRS_AIR202) || \ defined(BLINKER_PRO_SIM7020) || defined(BLINKER_PRO_AIR202) || \ defined(BLINKER_MQTT_AUTO) || defined(BLINKER_PRO_ESP) || \ - defined(BLINKER_WIFI_SUBDEVICE) + defined(BLINKER_WIFI_SUBDEVICE) || defined(BLINKER_QRCODE_NBIOT_SIM7020) class BlinkerSharer { public : diff --git a/src/Functions/BlinkerHTTPSIM7020.h b/src/Functions/BlinkerHTTPSIM7020.h index b34c4874..b08aecc8 100644 --- a/src/Functions/BlinkerHTTPSIM7020.h +++ b/src/Functions/BlinkerHTTPSIM7020.h @@ -674,7 +674,7 @@ class BlinkerHTTPSIM7020 http_time = millis(); http_status = sim7020_http_con_req; - while(millis() - http_time < _httpTimeout * 2) + while(millis() - http_time < _httpTimeout * 20) { if (available()) { diff --git a/src/Functions/BlinkerMQTTSIM7020.h b/src/Functions/BlinkerMQTTSIM7020.h index 1c917486..d69289a6 100644 --- a/src/Functions/BlinkerMQTTSIM7020.h +++ b/src/Functions/BlinkerMQTTSIM7020.h @@ -256,15 +256,17 @@ int BlinkerMQTTSIM7020::connected() { // yield(); + // BLINKER_LOG_ALL(BLINKER_F(">>>>>> mqtt connected check <<<<<<")); + if (isConnected && (millis() - ping_time) <= 10000) { yield(); return isConnected; } - if ((millis() - ping_time) <= 30000) return false; + if ((millis() - ping_time) <= 60000) return false; - BLINKER_LOG_ALL(BLINKER_F(">>>>>> mqtt connected check <<<<<<")); + BLINKER_LOG_ALL(BLINKER_F(">>>>>> mqtt connected check ping_time<<<<<<")); streamPrint(STRING_format(BLINKER_CMD_CMQCON_REQ) + "?"); mqtt_time = millis(); ping_time = millis(); diff --git a/src/modules/TaskScheduler/TaskScheduler.h b/src/modules/TaskScheduler/TaskScheduler.h index f3337906..01b2e457 100644 --- a/src/modules/TaskScheduler/TaskScheduler.h +++ b/src/modules/TaskScheduler/TaskScheduler.h @@ -112,7 +112,7 @@ // 2017-04-27 - added destructor to the Task class to ensure tasks are disables and taken off the execution chain // upon destruction. (Contributed by Edwin van Leeuwen [BlackEdder - https://github.com/BlackEdder) // -// v2.5.0: +// v2.7.2: // 2017-04-27 - ESP8266 ONLY: added optional support for std::functions via _TASK_STD_FUNCTION compilation option // (Contributed by Edwin van Leeuwen [BlackEdder - https://github.com/BlackEdder) // 2017-08-30 - add _TASK_DEBUG making all methods and variables public FOR DEBUGGING PURPOSES ONLY! From 5a1e6492d7be96f822fd4e1e7c3d2a66ca639ff5 Mon Sep 17 00:00:00 2001 From: i3water <121024123@qq.com> Date: Wed, 26 Aug 2020 18:04:43 +0800 Subject: [PATCH 3/4] update codes, upgrade NO SSL support codes & example --- .../Hello_WiFi_Without_SSL.ino | 95 +++++++++ keywords.txt | 1 + src/Adapters/BlinkerMQTT.h | 44 +++- src/Blinker/BlinkerApi.h | 190 ++++++++++++++++-- src/Functions/BlinkerOTA.h | 8 + src/Server/BlinkerServer.h | 6 +- 6 files changed, 311 insertions(+), 33 deletions(-) create mode 100644 examples/Blinker_Hello/Hello_WiFi_Without_SSL/Hello_WiFi_Without_SSL.ino diff --git a/examples/Blinker_Hello/Hello_WiFi_Without_SSL/Hello_WiFi_Without_SSL.ino b/examples/Blinker_Hello/Hello_WiFi_Without_SSL/Hello_WiFi_Without_SSL.ino new file mode 100644 index 00000000..7a3f651f --- /dev/null +++ b/examples/Blinker_Hello/Hello_WiFi_Without_SSL/Hello_WiFi_Without_SSL.ino @@ -0,0 +1,95 @@ +/* ***************************************************************** + * + * Download latest Blinker library here: + * https://github.com/blinker-iot/blinker-library/archive/master.zip + * + * + * Blinker is a cross-hardware, cross-platform solution for the IoT. + * It provides APP, device and server support, + * and uses public cloud services for data transmission and storage. + * It can be used in smart home, data monitoring and other fields + * to help users build Internet of Things projects better and faster. + * + * Make sure installed 2.7.2 or later ESP8266/Arduino package, + * if use ESP8266 with Blinker. + * https://github.com/esp8266/Arduino/releases + * + * Make sure installed 1.0.4 or later ESP32/Arduino package, + * if use ESP32 with Blinker. + * https://github.com/espressif/arduino-esp32/releases + * + * Docs: https://diandeng.tech/doc + * https://github.com/blinker-iot/blinker-doc/wiki + * + * ***************************************************************** + * + * Blinker 库下载地址: + * https://github.com/blinker-iot/blinker-library/archive/master.zip + * + * Blinker 是一套跨硬件、跨平台的物联网解决方案,提供APP端、设备端、 + * 服务器端支持,使用公有云服务进行数据传输存储。可用于智能家居、 + * 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。 + * + * 如果使用 ESP8266 接入 Blinker, + * 请确保安装了 2.7.2 或更新的 ESP8266/Arduino 支持包。 + * https://github.com/esp8266/Arduino/releases + * + * 如果使用 ESP32 接入 Blinker, + * 请确保安装了 1.0.4 或更新的 ESP32/Arduino 支持包。 + * https://github.com/espressif/arduino-esp32/releases + * + * 文档: https://diandeng.tech/doc + * https://github.com/blinker-iot/blinker-doc/wiki + * + * *****************************************************************/ + +#define BLINKER_WIFI +#define BLINKER_WITHOUT_SSL + +#include + +char auth[] = "6650efab7f0a"; +char ssid[] = "有没有wifi"; +char pswd[] = "i8888888"; + +// 新建组件对象 +BlinkerButton Button1("btn-abc"); +BlinkerNumber Number1("num-abc"); + +int counter = 0; + +// 按下按键即会执行该函数 +void button1_callback(const String & state) +{ + BLINKER_LOG("get button state: ", state); + digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN)); +} + +// 如果未绑定的组件被触发,则会执行其中内容 +void dataRead(const String & data) +{ + BLINKER_LOG("Blinker readString: ", data); + counter++; + Number1.print(counter); +} + +void setup() +{ + // 初始化串口 + Serial.begin(115200); + BLINKER_DEBUG.stream(Serial); + BLINKER_DEBUG.debugAll(); + + // 初始化有LED的IO + pinMode(LED_BUILTIN, OUTPUT); + digitalWrite(LED_BUILTIN, HIGH); + // 初始化blinker + Blinker.begin(auth, ssid, pswd); + Blinker.attachData(dataRead); + + Button1.attach(button1_callback); +} + +void loop() { + Blinker.run(); +} diff --git a/keywords.txt b/keywords.txt index fe619fcf..54b568d4 100644 --- a/keywords.txt +++ b/keywords.txt @@ -139,6 +139,7 @@ BLINKER_ESP_SMARTCONFIG KEYWORD2 BLINKER_APCONFIG KEYWORD2 BLINKER_BLE KEYWORD2 BLINKER_WIFI KEYWORD2 +BLINKER_WITHOUT_SSL KEYWORD2 BLINKER_WIFI_AUTO KEYWORD2 BLINKER_LOWPOWER KEYWORD2 BLINKER_LOWPOWER_AIR202 KEYWORD2 diff --git a/src/Adapters/BlinkerMQTT.h b/src/Adapters/BlinkerMQTT.h index dcb9429d..b65488be 100644 --- a/src/Adapters/BlinkerMQTT.h +++ b/src/Adapters/BlinkerMQTT.h @@ -228,7 +228,11 @@ char* BLINKER_RRPC_SUB_TOPIC_MQTT; uint16_t MQTT_PORT_MQTT; #if defined(ESP8266) - BearSSL::WiFiClientSecure client_mqtt; + #ifndef BLINKER_WITHOUT_SSL + BearSSL::WiFiClientSecure client_mqtt; + #else + WiFiClient client_mqtt; + #endif // WiFiClientSecure client_mqtt; #elif defined(ESP32) WiFiClientSecure client_s; @@ -343,8 +347,10 @@ int BlinkerMQTT::connect() // BLINKER_LOG_ALL(BLINKER_F("MQTT_KEY_MQTT: "), MQTT_KEY_MQTT); #if defined(ESP8266) - client_mqtt.setInsecure(); - ::delay(10); + #ifndef BLINKER_WITHOUT_SSL + client_mqtt.setInsecure(); + ::delay(10); + #endif #endif if ((ret = mqtt_MQTT->connect()) != 0) @@ -1914,13 +1920,16 @@ int BlinkerMQTT::connectServer() { // String payload = _dataGet; + #ifndef BLINKER_WITHOUT_SSL + client_mqtt.stop(); - client_mqtt.stop(); - - std::unique_ptrclient_s(new BearSSL::WiFiClientSecure); + std::unique_ptrclient_s(new BearSSL::WiFiClientSecure); - // client_s->setFingerprint(fingerprint); - client_s->setInsecure(); + // client_s->setFingerprint(fingerprint); + client_s->setInsecure(); + #else + WiFiClient client_s; + #endif String url_iot = BLINKER_F("/api/v1/user/device/diy/auth?authKey="); url_iot += _authKey; @@ -1929,18 +1938,29 @@ int BlinkerMQTT::connectServer() { url_iot += _miType; url_iot += BLINKER_F("&version="); url_iot += BLINKER_OTA_VERSION_CODE; + #ifndef BLINKER_WITHOUT_SSL url_iot += BLINKER_F("&protocol=mqtts"); + #else + url_iot += BLINKER_F("&protocol=mqtt"); + #endif // url_iot += BLINKER_OTA_VERSION_CODE; - url_iot = "https://" + host + url_iot; - + #ifndef BLINKER_WITHOUT_SSL + url_iot = "https://" + host + url_iot; + #else + url_iot = "http://" + host + url_iot; + #endif HTTPClient http; String payload; BLINKER_LOG_ALL(BLINKER_F("[HTTP] begin: "), url_iot); + #ifndef BLINKER_WITHOUT_SSL if (http.begin(*client_s, url_iot)) { // HTTPS + #else + if (http.begin(client_s, url_iot)) { + #endif // Serial.print("[HTTPS] GET...\n"); // start connection and send HTTP header @@ -2369,7 +2389,9 @@ int BlinkerMQTT::connectServer() { #if defined(ESP8266) // client_s->stop(); // if (!isMQTTinit) - client_mqtt.setInsecure(); + #ifndef BLINKER_WITHOUT_SSL + client_mqtt.setInsecure(); + #endif #endif // connect(); diff --git a/src/Blinker/BlinkerApi.h b/src/Blinker/BlinkerApi.h index 25fb0af3..6e4457cb 100644 --- a/src/Blinker/BlinkerApi.h +++ b/src/Blinker/BlinkerApi.h @@ -1366,9 +1366,11 @@ class BlinkerApi : public BlinkerProtocol // httpCode = http.GET(); url_iot = BLINKER_F("/api/v1/storage/ts "); - + #ifndef BLINKER_WITHOUT_SSL http.begin("https://storage.diandeng.tech", url_iot); - + #else + http.begin("http://storage.diandeng.tech", url_iot); + #endif // http.addHeader(conType, application); httpCode = http.POST(msg, conType, application); break; @@ -1383,9 +1385,11 @@ class BlinkerApi : public BlinkerProtocol // httpCode = http.GET(); url_iot = BLINKER_F("/api/v1/storage/text "); - + #ifndef BLINKER_WITHOUT_SSL http.begin("https://storage.diandeng.tech", url_iot); - + #else + http.begin("http://storage.diandeng.tech", url_iot); + #endif // http.addHeader(conType, application); httpCode = http.POST(msg, conType, application); break; @@ -1400,9 +1404,11 @@ class BlinkerApi : public BlinkerProtocol // httpCode = http.GET(); url_iot = BLINKER_F("/api/v1/storage/object "); - + #ifndef BLINKER_WITHOUT_SSL http.begin("https://storage.diandeng.tech", url_iot); - + #else + http.begin("http://storage.diandeng.tech", url_iot); + #endif // http.addHeader(conType, application); httpCode = http.POST(msg, conType, application); break; @@ -1949,25 +1955,31 @@ class BlinkerApi : public BlinkerProtocol break; case BLINKER_CMD_TIME_SLOT_DATA_NUMBER : url_iot = BLINKER_F("/api/v1/storage/ts"); - + #ifndef BLINKER_WITHOUT_SSL http.begin("https://storage.diandeng.tech", url_iot); - + #else + http.begin("http://storage.diandeng.tech", url_iot); + #endif // http.addHeader(conType, application); httpCode = http.POST(msg, conType, application); break; case BLINKER_CMD_TEXT_DATA_NUMBER : url_iot = BLINKER_F("/api/v1/storage/text"); - + #ifndef BLINKER_WITHOUT_SSL http.begin("https://storage.diandeng.tech", url_iot); - + #else + http.begin("http://storage.diandeng.tech", url_iot); + #endif // http.addHeader(conType, application); httpCode = http.POST(msg, conType, application); break; case BLINKER_CMD_JSON_DATA_NUMBER : url_iot = BLINKER_F("/api/v1/storage/object"); - + #ifndef BLINKER_WITHOUT_SSL http.begin("https://storage.diandeng.tech", url_iot); - + #else + http.begin("http://storage.diandeng.tech", url_iot); + #endif // http.addHeader(conType, application); httpCode = http.POST(msg, conType, application); break; @@ -11249,13 +11261,17 @@ char * BlinkerApi::widgetName_tab(uint8_t num) // #endif #if defined(ESP8266) - extern BearSSL::WiFiClientSecure client_mqtt; - client_mqtt.stop(); - - std::unique_ptrclient_s(new BearSSL::WiFiClientSecure); + #ifndef BLINKER_WITHOUT_SSL + extern BearSSL::WiFiClientSecure client_mqtt; + client_mqtt.stop(); + + std::unique_ptrclient_s(new BearSSL::WiFiClientSecure); - // client_s->setFingerprint(fingerprint); - client_s->setInsecure(); + // client_s->setFingerprint(fingerprint); + client_s->setInsecure(); + #else + WiFiClient client_s; + #endif #endif HTTPClient http; @@ -11279,7 +11295,11 @@ char * BlinkerApi::widgetName_tab(uint8_t num) url_iot += BLINKER_F("/api/v1/user/device/sms"); #if defined(ESP8266) + #ifndef BLINKER_WITHOUT_SSL http.begin(*client_s, url_iot); + #else + http.begin(client_s, url_iot); + #endif #else http.begin(url_iot); #endif @@ -11292,7 +11312,11 @@ char * BlinkerApi::widgetName_tab(uint8_t num) url_iot += BLINKER_F("/api/v1/user/device/push"); #if defined(ESP8266) + #ifndef BLINKER_WITHOUT_SSL http.begin(*client_s, url_iot); + #else + http.begin(client_s, url_iot); + #endif #else http.begin(url_iot); #endif @@ -11306,7 +11330,11 @@ char * BlinkerApi::widgetName_tab(uint8_t num) url_iot += BLINKER_F("/api/v1/user/device/wxMsg/"); #if defined(ESP8266) + #ifndef BLINKER_WITHOUT_SSL http.begin(*client_s, url_iot); + #else + http.begin(client_s, url_iot); + #endif #else http.begin(url_iot); #endif @@ -11321,7 +11349,11 @@ char * BlinkerApi::widgetName_tab(uint8_t num) url_iot += msg; #if defined(ESP8266) + #ifndef BLINKER_WITHOUT_SSL http.begin(*client_s, url_iot); + #else + http.begin(client_s, url_iot); + #endif #else http.begin(url_iot); #endif @@ -11334,7 +11366,11 @@ char * BlinkerApi::widgetName_tab(uint8_t num) url_iot += msg; #if defined(ESP8266) + #ifndef BLINKER_WITHOUT_SSL http.begin(*client_s, url_iot); + #else + http.begin(client_s, url_iot); + #endif #else http.begin(url_iot); #endif @@ -11347,7 +11383,11 @@ char * BlinkerApi::widgetName_tab(uint8_t num) url_iot += msg; #if defined(ESP8266) + #ifndef BLINKER_WITHOUT_SSL http.begin(*client_s, url_iot); + #else + http.begin(client_s, url_iot); + #endif #else http.begin(url_iot); #endif @@ -11360,7 +11400,11 @@ char * BlinkerApi::widgetName_tab(uint8_t num) url_iot += msg; #if defined(ESP8266) + #ifndef BLINKER_WITHOUT_SSL http.begin(*client_s, url_iot); + #else + http.begin(client_s, url_iot); + #endif #else http.begin(url_iot); #endif @@ -11375,7 +11419,11 @@ char * BlinkerApi::widgetName_tab(uint8_t num) url_iot += BLINKER_F("/api/v1/user/device/userconfig"); #if defined(ESP8266) + #ifndef BLINKER_WITHOUT_SSL http.begin(*client_s, url_iot); + #else + http.begin(client_s, url_iot); + #endif #else http.begin(url_iot); #endif @@ -11389,7 +11437,11 @@ char * BlinkerApi::widgetName_tab(uint8_t num) url_iot += msg; #if defined(ESP8266) + #ifndef BLINKER_WITHOUT_SSL http.begin(*client_s, url_iot); + #else + http.begin(client_s, url_iot); + #endif #else http.begin(url_iot); #endif @@ -11402,7 +11454,11 @@ char * BlinkerApi::widgetName_tab(uint8_t num) url_iot += msg; #if defined(ESP8266) + #ifndef BLINKER_WITHOUT_SSL http.begin(*client_s, url_iot); + #else + http.begin(client_s, url_iot); + #endif #else http.begin(url_iot); #endif @@ -11414,7 +11470,11 @@ char * BlinkerApi::widgetName_tab(uint8_t num) url_iot += BLINKER_F("/api/v1/user/device/cloudStorage/"); #if defined(ESP8266) + #ifndef BLINKER_WITHOUT_SSL http.begin(*client_s, url_iot); + #else + http.begin(client_s, url_iot); + #endif #else http.begin(url_iot); #endif @@ -11424,10 +11484,18 @@ char * BlinkerApi::widgetName_tab(uint8_t num) break; case BLINKER_CMD_TIME_SLOT_DATA_NUMBER : // url_iot = host; - url_iot = BLINKER_F("https://storage.diandeng.tech/api/v1/storage/ts"); + #ifndef BLINKER_WITHOUT_SSL + url_iot = BLINKER_F("https://storage.diandeng.tech/api/v1/storage/ts"); + #else + url_iot = BLINKER_F("http://storage.diandeng.tech/api/v1/storage/ts"); + #endif #if defined(ESP8266) + #ifndef BLINKER_WITHOUT_SSL http.begin(*client_s, url_iot); + #else + http.begin(client_s, url_iot); + #endif #else http.begin(url_iot); #endif @@ -11437,10 +11505,18 @@ char * BlinkerApi::widgetName_tab(uint8_t num) break; case BLINKER_CMD_TEXT_DATA_NUMBER : // url_iot = host; - url_iot = BLINKER_F("https://storage.diandeng.tech/api/v1/storage/text"); + #ifndef BLINKER_WITHOUT_SSL + url_iot = BLINKER_F("https://storage.diandeng.tech/api/v1/storage/text"); + #else + url_iot = BLINKER_F("http://storage.diandeng.tech/api/v1/storage/text"); + #endif #if defined(ESP8266) + #ifndef BLINKER_WITHOUT_SSL http.begin(*client_s, url_iot); + #else + http.begin(client_s, url_iot); + #endif #else http.begin(url_iot); #endif @@ -11450,10 +11526,18 @@ char * BlinkerApi::widgetName_tab(uint8_t num) break; case BLINKER_CMD_JSON_DATA_NUMBER : // url_iot = host; - url_iot = BLINKER_F("https://storage.diandeng.tech/api/v1/storage/object"); + #ifndef BLINKER_WITHOUT_SSL + url_iot = BLINKER_F("https://storage.diandeng.tech/api/v1/storage/object"); + #else + url_iot = BLINKER_F("http://storage.diandeng.tech/api/v1/storage/object"); + #endif #if defined(ESP8266) + #ifndef BLINKER_WITHOUT_SSL http.begin(*client_s, url_iot); + #else + http.begin(client_s, url_iot); + #endif #else http.begin(url_iot); #endif @@ -11467,7 +11551,11 @@ char * BlinkerApi::widgetName_tab(uint8_t num) url_iot += msg; #if defined(ESP8266) + #ifndef BLINKER_WITHOUT_SSL http.begin(*client_s, url_iot); + #else + http.begin(client_s, url_iot); + #endif #else http.begin(url_iot); #endif @@ -11480,7 +11568,11 @@ char * BlinkerApi::widgetName_tab(uint8_t num) url_iot += msg; #if defined(ESP8266) + #ifndef BLINKER_WITHOUT_SSL http.begin(*client_s, url_iot); + #else + http.begin(client_s, url_iot); + #endif #else http.begin(url_iot); #endif @@ -11493,7 +11585,11 @@ char * BlinkerApi::widgetName_tab(uint8_t num) url_iot += msg; #if defined(ESP8266) + #ifndef BLINKER_WITHOUT_SSL http.begin(*client_s, url_iot); + #else + http.begin(client_s, url_iot); + #endif #else http.begin(url_iot); #endif @@ -11506,7 +11602,11 @@ char * BlinkerApi::widgetName_tab(uint8_t num) url_iot += msg; #if defined(ESP8266) + #ifndef BLINKER_WITHOUT_SSL http.begin(*client_s, url_iot); + #else + http.begin(client_s, url_iot); + #endif #else http.begin(url_iot); #endif @@ -11518,7 +11618,11 @@ char * BlinkerApi::widgetName_tab(uint8_t num) url_iot += BLINKER_F("/api/v1/user/device/ota/upgrade_status"); #if defined(ESP8266) + #ifndef BLINKER_WITHOUT_SSL http.begin(*client_s, url_iot); + #else + http.begin(client_s, url_iot); + #endif #else http.begin(url_iot); #endif @@ -11532,7 +11636,11 @@ char * BlinkerApi::widgetName_tab(uint8_t num) url_iot += msg; #if defined(ESP8266) + #ifndef BLINKER_WITHOUT_SSL http.begin(*client_s, url_iot); + #else + http.begin(client_s, url_iot); + #endif #else http.begin(url_iot); #endif @@ -11545,7 +11653,11 @@ char * BlinkerApi::widgetName_tab(uint8_t num) url_iot += msg; #if defined(ESP8266) + #ifndef BLINKER_WITHOUT_SSL http.begin(*client_s, url_iot); + #else + http.begin(client_s, url_iot); + #endif #else http.begin(url_iot); #endif @@ -11558,7 +11670,11 @@ char * BlinkerApi::widgetName_tab(uint8_t num) url_iot += msg; #if defined(ESP8266) + #ifndef BLINKER_WITHOUT_SSL http.begin(*client_s, url_iot); + #else + http.begin(client_s, url_iot); + #endif #else http.begin(url_iot); #endif @@ -11571,7 +11687,11 @@ char * BlinkerApi::widgetName_tab(uint8_t num) url_iot += msg; #if defined(ESP8266) + #ifndef BLINKER_WITHOUT_SSL http.begin(*client_s, url_iot); + #else + http.begin(client_s, url_iot); + #endif #else http.begin(url_iot); #endif @@ -11583,7 +11703,11 @@ char * BlinkerApi::widgetName_tab(uint8_t num) url_iot += BLINKER_F("/api/v1/user/device/lowpower/data"); #if defined(ESP8266) + #ifndef BLINKER_WITHOUT_SSL http.begin(*client_s, url_iot); + #else + http.begin(client_s, url_iot); + #endif #else http.begin(url_iot); #endif @@ -11596,7 +11720,11 @@ char * BlinkerApi::widgetName_tab(uint8_t num) url_iot += BLINKER_F("/api/v1/user/device/event"); #if defined(ESP8266) + #ifndef BLINKER_WITHOUT_SSL http.begin(*client_s, url_iot); + #else + http.begin(client_s, url_iot); + #endif #else http.begin(url_iot); #endif @@ -11609,7 +11737,11 @@ char * BlinkerApi::widgetName_tab(uint8_t num) url_iot += BLINKER_F("/api/v1/user/device/gps"); #if defined(ESP8266) + #ifndef BLINKER_WITHOUT_SSL http.begin(*client_s, url_iot); + #else + http.begin(client_s, url_iot); + #endif #else http.begin(url_iot); #endif @@ -11623,7 +11755,11 @@ char * BlinkerApi::widgetName_tab(uint8_t num) url_iot += msg; #if defined(ESP8266) + #ifndef BLINKER_WITHOUT_SSL http.begin(*client_s, url_iot); + #else + http.begin(client_s, url_iot); + #endif #else http.begin(url_iot); #endif @@ -11636,7 +11772,11 @@ char * BlinkerApi::widgetName_tab(uint8_t num) url_iot += BLINKER_F("/api/v1/user/device/event"); #if defined(ESP8266) + #ifndef BLINKER_WITHOUT_SSL http.begin(*client_s, url_iot); + #else + http.begin(client_s, url_iot); + #endif #else http.begin(url_iot); #endif @@ -11649,7 +11789,11 @@ char * BlinkerApi::widgetName_tab(uint8_t num) url_iot += BLINKER_F("/api/v1/user/device/event"); #if defined(ESP8266) + #ifndef BLINKER_WITHOUT_SSL http.begin(*client_s, url_iot); + #else + http.begin(client_s, url_iot); + #endif #else http.begin(url_iot); #endif @@ -11662,7 +11806,11 @@ char * BlinkerApi::widgetName_tab(uint8_t num) url_iot += BLINKER_F("/api/v1/user/device/event"); #if defined(ESP8266) + #ifndef BLINKER_WITHOUT_SSL http.begin(*client_s, url_iot); + #else + http.begin(client_s, url_iot); + #endif #else http.begin(url_iot); #endif diff --git a/src/Functions/BlinkerOTA.h b/src/Functions/BlinkerOTA.h index 11e83e0a..edd5ced0 100644 --- a/src/Functions/BlinkerOTA.h +++ b/src/Functions/BlinkerOTA.h @@ -10,7 +10,9 @@ #include #include + #ifndef BLINKER_WITHOUT_SSL extern BearSSL::WiFiClientSecure client_mqtt; + #endif #elif defined(ESP32) #include #include @@ -119,6 +121,7 @@ bool BlinkerOTA::update() { saveOTACheck(); #if defined(ESP8266) + #ifndef BLINKER_WITHOUT_SSL BearSSL::WiFiClientSecure client_s; BLINKER_LOG_FreeHeap(); @@ -160,6 +163,11 @@ bool BlinkerOTA::update() { // BLINKER_LOG_ALL(BLINKER_F("HTTP_UPDATE_OK")); // return true; // } + + #else + WiFiClient client_s; + #endif + #elif defined(ESP32) client_s.stop(); #endif diff --git a/src/Server/BlinkerServer.h b/src/Server/BlinkerServer.h index 11881b80..cfc430cf 100644 --- a/src/Server/BlinkerServer.h +++ b/src/Server/BlinkerServer.h @@ -2,7 +2,11 @@ #define BLINKER_SERVER_H #ifndef BLINKER_SERVER_HTTPS - #define BLINKER_SERVER_HTTPS "https://iot.diandeng.tech" + #ifndef BLINKER_WITHOUT_SSL + #define BLINKER_SERVER_HTTPS "https://iot.diandeng.tech" + #else + #define BLINKER_SERVER_HTTPS "http://iot.diandeng.tech" + #endif #endif #ifndef BLINKER_SERVER_HOST From f4782b74d32a79f99b0c05ec38edbfe79265ca30 Mon Sep 17 00:00:00 2001 From: i3water <121024123@qq.com> Date: Wed, 26 Aug 2020 18:07:38 +0800 Subject: [PATCH 4/4] update codes, upgrade NO SSL codes. --- .../Hello_WiFi_Without_SSL/Hello_WiFi_Without_SSL.ino | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/Blinker_Hello/Hello_WiFi_Without_SSL/Hello_WiFi_Without_SSL.ino b/examples/Blinker_Hello/Hello_WiFi_Without_SSL/Hello_WiFi_Without_SSL.ino index 7a3f651f..a5b15b45 100644 --- a/examples/Blinker_Hello/Hello_WiFi_Without_SSL/Hello_WiFi_Without_SSL.ino +++ b/examples/Blinker_Hello/Hello_WiFi_Without_SSL/Hello_WiFi_Without_SSL.ino @@ -48,9 +48,9 @@ #include -char auth[] = "6650efab7f0a"; -char ssid[] = "有没有wifi"; -char pswd[] = "i8888888"; +char auth[] = "Your Device Secret Key"; +char ssid[] = "Your WiFi network SSID or name"; +char pswd[] = "Your WiFi network WPA password or WEP key"; // 新建组件对象 BlinkerButton Button1("btn-abc");