|
小白求助,使用esp12f连不上热点,看别人视频上好像直接编译上传就连上去了
ets Jan 8 2013,rst cause:2, boot mode3,6)
load 0x4010f000, len 3584, room 16
tail 0
chksum 0xb0
csum 0xb0
v2843a5ac
~ld
[65]
[65]
__ __ __
/\ \ /\ \ __ /\ \ v0.3.5
\ \ \___ \ \ \ /\_\ ___\ \ \/'\ __ _ __
\ \ '__`\\ \ \ \/\ \ /' _ `\ \ , < /'__`\/\`'__\
\ \ \L\ \\ \ \_\ \ \/\ \/\ \ \ \\`\ /\ __/\ \ \./
\ \_,__/ \ \__\\ \_\ \_\ \_\ \_\ \_\ \____\\ \_\
\/___/ \/__/ \/_/\/_/\/_/\/_/\/_/\/____/ \/_/
To better use blinker with your IoT project!
Download latest blinker library here!
=> https://github.com/blinker-iot/blinker-library
[98] _aliType:
[99] _duerType:
[101] _miType:
[102] _authKey: 1d4b3016d94a
[105] Connecting to creep
[110] ESP8266_MQTT initialized...
[110]
===========================================================
================== Blinker Timer loaded! ==================
Warning!EEPROM address 1536-2431 is used for Blinker Timer!
============= DON'T USE THESE EEPROM ADDRESS! =============
===========================================================
[139] countdown state: false
[140] _cdRunState: 0
[142] _totalTime: 0
[144] _runTime: 0
[145] _action:
[148] loop state: false
[149] _lpRunState: 0
[151] _times: 0
[152] _tri_times: 0
[154] _time1: 0
[156] _action1:
[157] _time2: 0
[159] _action2:
[160] _lpData: 0
[162] checkNum count: 1
代码(直接用blinker示例改的):
#define BLINKER_WIFI
#include <Blinker.h>
char auth[] = "1d4b3016d94a";
char ssid[] = "creep";
char pswd[] = "2393863647";
// 新建组件对象
BlinkerButton Button1("btn-gm6");
BlinkerNumber Number1("num-bmt");
int counter = 0;
int LED1 = 13;
// 按下按键即会执行该函数
void button1_callback(const String & state)
{
BLINKER_LOG("get button state: ", state);
digitalWrite(LED1, !digitalRead(LED1));
}
// 如果未绑定的组件被触发,则会执行其中内容
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(LED1, OUTPUT);
digitalWrite(LED1, LOW);
// 初始化blinker
Blinker.begin(auth, ssid, pswd);
Blinker.attachData(dataRead);
Button1.attach(button1_callback);
}
void loop() {
Blinker.run();
}
|
|