通过手机移动端Blinker APP向ESP8266发送文字信息
- 🔧blinker APP:
https://diandeng.tech/dev - 🔨blinker:
https://github.com/blinker-iot/blinker-library
📑blinker简介
blinker是一套跨硬件、跨平台的物联网解决方案,提供APP端、设备端、服务器端支持,使用公有云服务进行数据传输。可用于智能家居、数据监测等领域,可以快速搭建个人的物联网项目。
- Blinker库发送文字信息例程
https://github.com/blinker-iot/blinker-library/blob/master/examples/Blinker_Hello/Hello_WiFi/Hello_WiFi.ino
📝示例程序源码:
- ✨本例程是通过WIFI发送信息,esp8266和esp32可以通用。
/* *****************************************************************
*
* 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.4 or later ESP8266/Arduino package,
* if use ESP8266 with Blinker.
* https://github.com/esp8266/Arduino/releases
*
* Make sure installed 1.0.5 or later ESP32/Arduino package,
* if use ESP32 with Blinker.
* https://github.com/espressif/arduino-esp32/releases
*
* Docs: https://diandeng.tech/doc
*
*
* *****************************************************************
*
* Blinker 库下载地址:
* https://github.com/blinker-iot/blinker-library/archive/master.zip
*
* Blinker 是一套跨硬件、跨平台的物联网解决方案,提供APP端、设备端、
* 服务器端支持,使用公有云服务进行数据传输存储。可用于智能家居、
* 数据监测等领域,可以帮助用户更好更快地搭建物联网项目。
*
* 如果使用 ESP8266 接入 Blinker,
* 请确保安装了 2.7.4 或更新的 ESP8266/Arduino 支持包。
* https://github.com/esp8266/Arduino/releases
*
* 如果使用 ESP32 接入 Blinker,
* 请确保安装了 1.0.5 或更新的 ESP32/Arduino 支持包。
* https://github.com/espressif/arduino-esp32/releases
*
* 文档: https://diandeng.tech/doc
*
*
* *****************************************************************/
#define BLINKER_WIFI
#include <Blinker.h>
char auth[] = "KEY";
char ssid[] = "WIFI帐号";
char pswd[] = "WIFI密码";
void dataRead(const String & data)
{
BLINKER_LOG("Blinker readString: ", data);//串口打印手机APP端发过来的数据
uint32_t BlinkerTime = millis();
Blinker.textData("text data");
digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN));
}
void setup()
{
Serial.begin(115200);
BLINKER_DEBUG.stream(Serial);
pinMode(LED_BUILTIN, OUTPUT);//板载灯,esp32C3没有定义此引脚
digitalWrite(LED_BUILTIN, LOW);
Blinker.begin(auth, ssid, pswd);
Blinker.attachData(dataRead);
}
void loop()
{
Blinker.run();
}
- 📜esp8266串口打印

- 👉🏻手机APP端,添加组件和操作:


1008

被折叠的 条评论
为什么被折叠?



