为什么我使用点灯的Blinker.second()获取时间一直失败
:'(#define BLINKER_WIFI
#include <Blinker.h>
char auth[] = "XXX";
char ssid[] = "XXX";
char pswd[] = "XX";
void dataRead(const String & data)
{
BLINKER_LOG("Blinker readString: ", data);
Blinker.vibrate();
uint32_t BlinkerTime = millis();
Blinker.print(BlinkerTime);
Blinker.print("millis", BlinkerTime);
}
void setup() {
Serial.begin(115200);
BLINKER_DEBUG.stream(Serial);
BLINKER_DEBUG.debugAll();
Blinker.setTimezone(-8.0);
Blinker.begin(auth, ssid, pswd);
Blinker.attachData(dataRead);
// Blinker.attachHeartbeat(heartbeat);
}
void loop() {
Blinker.run();
int8_t hour1 = Blinker.hour();
BLINKER_LOG("hour1:",hour1);
int8_t minute1 = Blinker.minute();
BLINKER_LOG("minute:",minute1);
int8_t day1 = Blinker.mday();
BLINKER_LOG("day:",day1);
uint32 times = Blinker.time();
BLINKER_LOG("time:",times);
Blinker.delay(2000);
}
请确保package和lib版本均为最新,并测试例程,如有问题,请提供调试信息。
页:
[1]