启动后不联网怎么办-Arduino中文社区 - Powered by Discuz!

Arduino中文社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 2284|回复: 5

[已解答] 启动后不联网怎么办

[复制链接]
发表于 2019-11-8 21:11 | 显示全部楼层 |阅读模式
本帖最后由 af11050 于 2019-11-8 21:12 编辑

Blinker例程的HelloWifi工程,编译后,app连不上一直显示离线, 下面是debugAll信息

21:08:58.851 -> [0]
21:08:58.851 -> [0] blinker v0.3.3
21:08:58.851 ->     To better use blinker with your IoT project!
21:08:58.851 ->     Download latest blinker library here!
21:08:58.851 ->     => https://github.com/blinker-iot/blinker-library
21:08:58.898 ->
21:08:58.992 -> [109] print: AT
21:08:58.992 -> [109] Proto print...
21:08:58.992 -> [109] Freeheap: 804
21:08:58.992 -> [110] Response: AT
21:08:58.992 -> [110] Success...
21:08:58.992 -> [116] Freeheap: 942
21:08:59.976 -> [1112] print: AT
21:08:59.976 -> [1112] Proto print...
21:08:59.976 -> [1112] Freeheap: 804
21:08:59.976 -> [1113] Response: AT
21:08:59.976 -> [1113] Success...
21:08:59.976 -> [1119] Freeheap: 942
21:09:00.960 -> [2114] print: AT
21:09:00.960 -> [2115] Proto print...
21:09:01.007 -> [2115] Freeheap: 804
21:09:01.007 -> [2116] Response: AT
21:09:01.007 -> [2116] Success...
21:09:01.007 -> [2122] Freeheap: 942
21:09:01.991 -> [3118] print: AT
21:09:01.991 -> [3118] Proto print...
21:09:01.991 -> [3119] Freeheap: 804
21:09:01.991 -> [3119] Response: AT
21:09:01.991 -> [3120] Success...
21:09:01.991 -> [3126] Freeheap: 942
21:09:02.975 -> [4111] print: AT
21:09:02.975 -> [4111] Proto print...
21:09:02.975 -> [4112] Freeheap: 804
21:09:02.975 -> [4112] Response: AT
21:09:02.975 -> [4113] Success...
21:09:02.975 -> [4118] Freeheap: 942
21:09:03.959 -> [5114] print: AT
21:09:03.959 -> [5114] Proto print...
21:09:04.006 -> [5114] Freeheap: 804
21:09:04.006 -> [5115] Response: AT
21:09:04.006 -> [5115] Success...
21:09:04.006 -> [5122] Freeheap: 942
21:09:04.990 -> [6117] print: AT
21:09:04.990 -> [6118] Proto print...
21:09:04.990 -> [6118] Freeheap: 804
21:09:04.990 -> [6118] Response: AT
21:09:04.990 -> [6119] Success...
21:09:04.990 -> [6125] Freeheap: 942
21:09:05.974 -> [7110] print: AT
21:09:05.974 -> [7110] Proto print...
21:09:05.974 -> [7111] Freeheap: 804
21:09:05.974 -> [7111] Response: AT
21:09:05.974 -> [7112] Success...

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);
}




发表于 2019-11-8 22:28 | 显示全部楼层
不是完整的程序吧
 楼主| 发表于 2019-11-8 22:41 | 显示全部楼层
coloz 发表于 2019-11-8 22:28
不是完整的程序吧

:就是例程里的呀

// 新建组件对象
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);
   
    // 初始化有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();
}
发表于 2019-11-9 11:40 | 显示全部楼层
你给UNO烧wifi的例程怎么连???
发表于 2019-11-11 09:33 来自手机 | 显示全部楼层
例程改个密钥 路由器ssid和密码就可以连了
发表于 2019-11-11 09:44 | 显示全部楼层
请按提问指南,完整详细的描述问题
https://www.arduino.cn/thread-83658-1-1.html
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|Archiver|手机版|Arduino中文社区

GMT+8, 2024-11-28 18:53 , Processed in 0.100540 second(s), 15 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表