点灯·blinker-1物联网初次尝试-Arduino物联网控制LED灯-零基础篇
本帖最后由 caiyq52 于 2020-2-9 18:32 编辑疫情期间,待在家中在抖音上看到“暴改车间”分享的手机小爱同学物联网控制电脑开机、车库门、灯等,用到“点灯·blinker”开发起来十分方便,于是在家倒腾一下学习学习。做一个入门的测试程序物联网控制LED灯分享一下。
一、准备工作1.1软件·Arduino IDE (必须是1.8.10及以上版本!我这里使用的版本刚下载的1.8.11) Arduino IDE 1.8.11 链接:https://pan.baidu.com/s/1QQ8bjWcLga6hA2vsXdXVow提取码:b70v 或者在Arduino官网下载新版本:https://www.arduino.cc/
·安装blinker Arduino库(blinker-library-master.zip) blinker-library-master.zip 链接:https://pan.baidu.com/s/1NXzV_oPfvdzytI5FR0lDuw 提取码:9na8 将下载好的库文件夹(blinker-library-master)解压到 我的电脑>文档>Arduino>libraries 文件夹中。
·安装esp8266/esp32扩展包(8266_package_2.6.3.exe) 8266_package_2.6.3.exe 链接:https://pan.baidu.com/s/1yM1sDZ4494n8BM4dgPuS0A 提取码:9gl9 直接运行自动安装。
1.2硬件 ·ESP8266机智云开发板ESP12F (我手里就两种8266模块,一种是常用的ESP8266,但是没有下载器,所以就用机智云的这块板子啦!)
其它可用硬件:NodeMcu(说明如下) /* 此外用常用的ESP8266模块和NodeMcu都可以,只是在上传程序时注意选择对应的开发板,以及程序中的引脚使用!
NodeMcu 程序上传时选择开发板NodeMcu1.0(ESP-12E-Module)
https://item.taobao.com/item.htm?spm=a1z10.3-c-s.w4002-16652683029.10.36e4163a2RnSFd&id=597426041553
*/
二、开始
2.1点灯·blinkerAPP
·下载安装APP
https://diandeng.tech/doc/app-download
2.2 APP使用,及获取Key码和设置按钮名称
·步骤如图
2.3 Arduino程序
·参考点灯官网程序
https://diandeng.tech/doc/getting-start-arduino
·修改后的程序
#define BLINKER_WIFI
#include <Blinker.h>
char auth[] = "Your Device Secret Key"; //caiyq52-改成自己在点灯app中生成的key码
char ssid[] = "Your WiFi network SSID or name"; //caiyq52-改成自己的WIFI名称
char pswd[] = "Your WiFi network WPA password or WEP key";//caiyq52-改成自己的WIFI密码
// 新建组件对象
BlinkerButton Button1("btn-abc"); //caiyq52-此组件未点灯app中自己设置的按键,改名"btn-abc"必须与自己APP中设定的名称一致
int PinLED=13; //caiyq52-定义控制LED的引脚,此处我直接使用板子上自带的LED灯,它的j引脚是13;
// 按下按键即会执行该函数
void button1_callback(const String & state) {
BLINKER_LOG("get button state: ", state);
digitalWrite(PinLED, !digitalRead(PinLED)); //caiyq52-读取引脚PinLED电平,并设置为相反的电平,效果为在app中点击一次按钮LED灯的点亮或熄灭!
}
// 如果未绑定的组件被触发,则会执行其中内容
void setup() {
// 初始化串口
Serial.begin(115200);
BLINKER_DEBUG.stream(Serial);
// 初始化有LED的IO
pinMode(PinLED, OUTPUT); //caiyq52-设置引脚为输出模式
digitalWrite(PinLED, LOW); //caiyq52-设置初始状态为LOW低电平
// 初始化blinker
Blinker.begin(auth, ssid, pswd);
Button1.attach(button1_callback);
}
void loop() {
Blinker.run();
}
·选择工具-开发板-Generic ESP8266 Module
·连接硬件
注意!数据线需要连接到下面一块板子的Micro USB接口!
·选择对应的端口,最后上传程序!
三、测试
·机智云数据线供电,打开点灯APP,选择新建的Arduino设备。等待设备上线,点击APP按键测试机智云LED灯.
https://v.youku.com/v_show/id_XNDUzODc1NzY4NA==.html
测试视频地址:https://v.youku.com/v_show/id_XNDUzODc1NzY4NA==.html
2020.02.09武汉加油!中国加油!
本帖最后由 caiyq52 于 2020-3-2 21:28 编辑
扩展:其它硬件的使用方法(ESP8266模块+配套的继电器模块,可以实现开关控制)1.2硬件 ·ESP8266模块
https://www.arduino.cn/data/attachment/forum/202002/15/183144z63wt02gvp7lmp6g.jpg ·WIFI继电器模块https://www.arduino.cn/data/attachment/forum/202002/22/215918bcpseadkcksasktt.png · 8266烧录器https://www.arduino.cn/data/attachment/forum/202002/21/210922kh7brruhuszgoa0g.png
2.3 Arduino程序
·参考点灯示例程序
Arduino IDE——文件——示例——Blinker——Blinker_AliGenie——AliGenie_OUTLET
·最终程序在ESP8266中有两个引脚IO0、IO2可以使用,在程序中对应的定义引脚为0、2这款wifi继电器模块中控制继电器的是ESP8266的IO0引脚,所以在插上8266后引脚0控制继电器开关。
#define BLINKER_WIFI
#include <Blinker.h>
char auth[] = "Your Device Secret Key"; //caiyq52-改成自己在点灯app中生成的key码
char ssid[] = "Your WiFi network SSID or name"; //caiyq52-改成自己的WIFI名称
char pswd[] = "Your WiFi network WPA password or WEP key";//caiyq52-改成自己的WIFI密码
// 新建组件对象
BlinkerButton Button1("btn-abc"); //caiyq52-此组件未点灯app中自己设置的按键,改名"btn-abc"必须与自己APP中设定的名称一致
int PinLED=0; //caiyq52-定义控制继电器的引脚,8266插在wifi模块上后引脚0控制继电器;
// 按下按键即会执行该函数
void button1_callback(const String & state) {
BLINKER_LOG("get button state: ", state);
digitalWrite(PinLED, !digitalRead(PinLED)); //caiyq52-读取引脚PinLED电平,并设置为相反的电平,效果为在app中点击一次按钮灯点亮或熄灭!
}
// 如果未绑定的组件被触发,则会执行其中内容
void setup() {
// 初始化串口
Serial.begin(115200);
BLINKER_DEBUG.stream(Serial);
// 初始化有LED的IO
pinMode(PinLED, OUTPUT); //caiyq52-设置引脚为输出模式
digitalWrite(PinLED, HIGH); //caiyq52-设置初始状态电平
// 初始化blinker
Blinker.begin(auth, ssid, pswd);
Button1.attach(button1_callback);
}
void loop() {
Blinker.run();
}
·选择工具-开发板-Generic ESP8266 Module
·连接硬件(烧录器+8266)
https://www.arduino.cn/data/attachment/forum/202002/21/211105n1977tojrsty918y.jpg
·选择对应的端口,上传程序!
2.5 控制电路搭建·连接硬件(WIFI继电器模块+8266)https://www.arduino.cn/data/attachment/forum/202002/22/213208c5f5ioojo7byod9i.png
·接线下如图
控制端想要接什么就自由发挥啦!这里提供一个示例
其他步骤方法与上相同。
chengliang7851 发表于 2020-3-5 10:45
#define BLINKER_WIFI
#define BLINKER_MIOT_MULTI_OUTLET //设置为小爱多个插座的模式
你是想把D1设置成状态开关模式,D2、3、4设置成点动模式吗?
像这样试试》
#define BLINKER_WIFI
#define BLINKER_MIOT_MULTI_OUTLET //设置为小爱多个插座的模式
#include <Blinker.h>
BlinkerButton Button1("btn-km"); //设置blinkerapp内数据键名
BlinkerButton Button2("btn-kckm"); //这里只用了其中三个
BlinkerButton Button3("btn-gckm");
BlinkerButton Button4("btn-ackm");
BlinkerText Text1("text_1");
char i;
char auth[] = "bfbf5f3fb57b";
char ssid[] = "MERCURY_07A8";
char pswd[] = "xg888888";
bool oState = { false }; //设置5路开关控制
void miotPowerState(const String & state, uint8_t num) //小爱同学控制指令
{
BLINKER_LOG("need set outlet: ", num, ", power state: ", state);
if(num==1){
i=D1; //指定每一路开关对应在开发板上的通道接口
}else if(num==2){
i=D2;
}else if(num==3){
i=D5;
}else if(num==4){
i=D6;
}
if (state == BLINKER_CMD_ON) {
digitalWrite(i, LOW); //这里控制模式都是点动模式
BlinkerMIOT.powerState("on", num);
BlinkerMIOT.print();
oState = true;
}
else if (state == BLINKER_CMD_OFF) {
digitalWrite(i, HIGH);
BlinkerMIOT.powerState("off", num);
BlinkerMIOT.print();
oState = false;
if (num == 0)
{
for (uint8_t o_num = 0; o_num < 5; o_num++)
{
oState = false;
}
}
}
}
void miotQuery(int32_t queryCode, uint8_t num)
{
BLINKER_LOG("AliGenie Query outlet: ", num,", codes: ", queryCode);
switch (queryCode)
{
case BLINKER_CMD_QUERY_ALL_NUMBER :
BLINKER_LOG("MIOT Query All");
BlinkerMIOT.powerState(oState ? "on" : "off", num);
BlinkerMIOT.print();
break;
case BLINKER_CMD_QUERY_POWERSTATE_NUMBER :
BLINKER_LOG("MIOT Query Power State");
BlinkerMIOT.powerState(oState ? "on" : "off", num);
BlinkerMIOT.print();
break;
default :
BlinkerMIOT.powerState(oState ? "on" : "off", num);
BlinkerMIOT.print();
break;
}
}
void dataRead(const String & data)
{
BLINKER_LOG("Blinker readString: ", data);
Blinker.vibrate();
uint32_t BlinkerTime = millis();
Blinker.print("millis", BlinkerTime);
}
void button1_callback(const String & state) //点灯app内控制按键触发
{
BLINKER_LOG("get button state: ", state);
digitalWrite(D1, !digitalRead(D1)) //caiyq52-D1状态取反输出,及实现开/关并保持状态,直到下次触发app按键
Blinker.print("开门命令已经处理");
Text1.print("shuju");
}
void button2_callback(const String & state) //点灯app内控制按键触发
{
BLINKER_LOG("get button state: ", state);
digitalWrite(D2, HIGH);
Blinker.delay(300);
Blinker.print("开车库门已经处理");
digitalWrite(D2, LOW);
}
void button3_callback(const String & state) //点灯app内控制按键触发
{
BLINKER_LOG("get button state: ", state);
digitalWrite(D5, HIGH);
Blinker.delay(400);
Blinker.print("关车库门已经处理");
digitalWrite(D5, LOW);
}
void button4_callback(const String & state) //点灯app内控制按键触发
{
BLINKER_LOG("get button state: ", state);
digitalWrite(D6, HIGH);
Blinker.delay(400);
Blinker.print("关门命令处理");
digitalWrite(D6, LOW);
}
void setup()
{
Serial.begin(115200);
BLINKER_DEBUG.stream(Serial);
pinMode(D1, OUTPUT);
digitalWrite(D1, LOW);
pinMode(D2, OUTPUT);
digitalWrite(D2, LOW);
pinMode(D5, OUTPUT);
digitalWrite(D5, LOW);
pinMode(D6, OUTPUT);
digitalWrite(D6, LOW);
Blinker.begin(auth, ssid, pswd);
Blinker.attachData(dataRead);
BlinkerMIOT.attachPowerState(miotPowerState);
BlinkerMIOT.attachQuery(miotQuery);
Button1.attach(button1_callback);
Button2.attach(button2_callback);
Button3.attach(button3_callback);
Button4.attach(button4_callback);
}
void loop()
{
Blinker.run();
}
会报错呀 15842547810 发表于 2020-2-9 19:34
会报错呀
确认Arduino版本、库、扩展包这三项都安装对了吗?
是报的什么错? Arduino:1.8.11 (Windows 7), 开发板:"Generic ESP8266 Module, 80 MHz, Flash, Disabled (new can abort), All SSL ciphers (most compatible), no dtr (aka ck), 26 MHz, 40MHz, DOUT (compatible), 512KB (FS:none OTA:~246KB), 2, nonos-sdk 2.2.1 (legacy), v2 Lower Memory, Disabled, None, Only Sketch, 115200"
C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\Administrator\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\Administrator\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries D:\Documents\Arduino\libraries -fqbn=esp8266:esp8266:generic:xtal=80,vt=flash,exception=disabled,ssl=all,ResetMethod=ck,CrystalFreq=26,FlashFreq=40,FlashMode=dout,eesz=512K,led=2,sdk=nonosdk221,ip=lm2f,dbg=Disabled,lvl=None____,wipe=none,baud=115200 -ide-version=10811 -build-path C:\Users\ADMINI~1\AppData\Local\Temp\arduino_build_278803 -warnings=none -build-cache C:\Users\ADMINI~1\AppData\Local\Temp\arduino_cache_390748 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.mkspiffs.path=C:\Users\Administrator\AppData\Local\Arduino15\packages\esp8266\tools\mkspiffs\2.5.0-4-b40a506 -prefs=runtime.tools.mkspiffs-2.5.0-4-b40a506.path=C:\Users\Administrator\AppData\Local\Arduino15\packages\esp8266\tools\mkspiffs\2.5.0-4-b40a506 -prefs=runtime.tools.mklittlefs.path=C:\Users\Administrator\AppData\Local\Arduino15\packages\esp8266\tools\mklittlefs\2.5.0-4-69bd9e6 -prefs=runtime.tools.mklittlefs-2.5.0-4-69bd9e6.path=C:\Users\Administrator\AppData\Local\Arduino15\packages\esp8266\tools\mklittlefs\2.5.0-4-69bd9e6 -prefs=runtime.tools.python3.path=C:\Users\Administrator\AppData\Local\Arduino15\packages\esp8266\tools\python3\3.7.2-post1 -prefs=runtime.tools.python3-3.7.2-post1.path=C:\Users\Administrator\AppData\Local\Arduino15\packages\esp8266\tools\python3\3.7.2-post1 -prefs=runtime.tools.xtensa-lx106-elf-gcc.path=C:\Users\Administrator\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\2.5.0-4-b40a506 -prefs=runtime.tools.xtensa-lx106-elf-gcc-2.5.0-4-b40a506.path=C:\Users\Administrator\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\2.5.0-4-b40a506 -verbose C:\Users\ADMINI~1\AppData\Local\Temp\untitled634689513.tmp\sketch_feb10a\sketch_feb10a.ino
C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\Administrator\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\Administrator\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries D:\Documents\Arduino\libraries -fqbn=esp8266:esp8266:generic:xtal=80,vt=flash,exception=disabled,ssl=all,ResetMethod=ck,CrystalFreq=26,FlashFreq=40,FlashMode=dout,eesz=512K,led=2,sdk=nonosdk221,ip=lm2f,dbg=Disabled,lvl=None____,wipe=none,baud=115200 -ide-version=10811 -build-path C:\Users\ADMINI~1\AppData\Local\Temp\arduino_build_278803 -warnings=none -build-cache C:\Users\ADMINI~1\AppData\Local\Temp\arduino_cache_390748 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.mkspiffs.path=C:\Users\Administrator\AppData\Local\Arduino15\packages\esp8266\tools\mkspiffs\2.5.0-4-b40a506 -prefs=runtime.tools.mkspiffs-2.5.0-4-b40a506.path=C:\Users\Administrator\AppData\Local\Arduino15\packages\esp8266\tools\mkspiffs\2.5.0-4-b40a506 -prefs=runtime.tools.mklittlefs.path=C:\Users\Administrator\AppData\Local\Arduino15\packages\esp8266\tools\mklittlefs\2.5.0-4-69bd9e6 -prefs=runtime.tools.mklittlefs-2.5.0-4-69bd9e6.path=C:\Users\Administrator\AppData\Local\Arduino15\packages\esp8266\tools\mklittlefs\2.5.0-4-69bd9e6 -prefs=runtime.tools.python3.path=C:\Users\Administrator\AppData\Local\Arduino15\packages\esp8266\tools\python3\3.7.2-post1 -prefs=runtime.tools.python3-3.7.2-post1.path=C:\Users\Administrator\AppData\Local\Arduino15\packages\esp8266\tools\python3\3.7.2-post1 -prefs=runtime.tools.xtensa-lx106-elf-gcc.path=C:\Users\Administrator\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\2.5.0-4-b40a506 -prefs=runtime.tools.xtensa-lx106-elf-gcc-2.5.0-4-b40a506.path=C:\Users\Administrator\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\2.5.0-4-b40a506 -verbose C:\Users\ADMINI~1\AppData\Local\Temp\untitled634689513.tmp\sketch_feb10a\sketch_feb10a.ino
Using board 'generic' from platform in folder: C:\Users\Administrator\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.3
Using core 'esp8266' from platform in folder: C:\Users\Administrator\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.3
Detecting libraries used...
"C:\\Users\\Administrator\\AppData\\Local\\Arduino15\\packages\\esp8266\\tools\\xtensa-lx106-elf-gcc\\2.5.0-4-b40a506/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\\Users\\Administrator\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.6.3/tools/sdk/include" "-IC:\\Users\\Administrator\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.6.3/tools/sdk/lwip2/include" "-IC:\\Users\\Administrator\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.6.3/tools/sdk/libc/xtensa-lx106-elf/include" "-IC:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\arduino_build_278803/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-rtti -falign-functions=4 -std=gnu++11 -ffunction-sections -fdata-sections -fno-exceptions -DNEW_OOM_ABORT -w -x c++ -E -CC -DNONOSDK221=1 -DF_CPU=80000000L -DLWIP_OPEN_SRC -DTCP_MSS=536 -DLWIP_FEATURES=1 -DLWIP_IPV6=0 -DARDUINO=10811 -DARDUINO_ESP8266_GENERIC -DARDUINO_ARCH_ESP8266 "-DARDUINO_BOARD=\"ESP8266_GENERIC\"" -DLED_BUILTIN=2 -DFLASHMODE_DOUT -DESP8266 "-IC:\\Users\\Administrator\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.6.3\\cores\\esp8266" "-IC:\\Users\\Administrator\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.6.3\\variants\\generic" "C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\arduino_build_278803\\sketch\\sketch_feb10a.ino.cpp" -o nul
Generating function prototypes...
"C:\\Users\\Administrator\\AppData\\Local\\Arduino15\\packages\\esp8266\\tools\\xtensa-lx106-elf-gcc\\2.5.0-4-b40a506/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\\Users\\Administrator\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.6.3/tools/sdk/include" "-IC:\\Users\\Administrator\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.6.3/tools/sdk/lwip2/include" "-IC:\\Users\\Administrator\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.6.3/tools/sdk/libc/xtensa-lx106-elf/include" "-IC:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\arduino_build_278803/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-rtti -falign-functions=4 -std=gnu++11 -ffunction-sections -fdata-sections -fno-exceptions -DNEW_OOM_ABORT -w -x c++ -E -CC -DNONOSDK221=1 -DF_CPU=80000000L -DLWIP_OPEN_SRC -DTCP_MSS=536 -DLWIP_FEATURES=1 -DLWIP_IPV6=0 -DARDUINO=10811 -DARDUINO_ESP8266_GENERIC -DARDUINO_ARCH_ESP8266 "-DARDUINO_BOARD=\"ESP8266_GENERIC\"" -DLED_BUILTIN=2 -DFLASHMODE_DOUT -DESP8266 "-IC:\\Users\\Administrator\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.6.3\\cores\\esp8266" "-IC:\\Users\\Administrator\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.6.3\\variants\\generic" "C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\arduino_build_278803\\sketch\\sketch_feb10a.ino.cpp" -o "C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\arduino_build_278803\\preproc\\ctags_target_for_gcc_minus_e.cpp"
"C:\\Program Files (x86)\\Arduino\\tools-builder\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\arduino_build_278803\\preproc\\ctags_target_for_gcc_minus_e.cpp"
正在编译项目...
"C:\\Users\\Administrator\\AppData\\Local\\Arduino15\\packages\\esp8266\\tools\\python3\\3.7.2-post1/python3" "C:\\Users\\Administrator\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.6.3/tools/signing.py" --mode header --publickey "C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\untitled634689513.tmp\\sketch_feb10a/public.key" --out "C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\arduino_build_278803/core/Updater_Signing.h"
exit status -1073741515
为开发板 Generic ESP8266 Module 编译时出错。 15842547810 发表于 2020-2-10 09:19
Arduino:1.8.11 (Windows 7), 开发板:"Generic ESP8266 Module, 80 MHz, Flash, Disabled (new can abort) ...
你打开一个blinker的示例程序编译一下看看是否也会报错。
估计和你8266的库有关系 点灯注册不了。。 // 新建组件对象
BlinkerButton Button1("btn-abc"); //caiyq52-此组件未点灯app中自己设置的按键,改名"btn-abc"必须与自己APP中设定的名称一致
这行我确定一致的啊 137098925 发表于 2020-2-21 15:08
// 新建组件对象
BlinkerButton Button1("btn-abc"); //caiyq52-此组件未点灯app中自己设置的按键,改名" ...
具体是什么情况,编译时报错吗? 我想问下ESP8266 01S 这个模块联网以后 能不能用4G网控制 或者局域网以外的WIFI控制开关 yantun924 发表于 2020-2-24 01:39
我想问下ESP8266 01S 这个模块联网以后 能不能用4G网控制 或者局域网以外的WIFI控制开关 ...
可以的,已经试过,用手机的网和外地的wifi都没问题。