Blinker MAX30205连不上网-Arduino中文社区 - Powered by Discuz! Archiver

kangyang 发表于 2020-6-10 12:44

Blinker MAX30205连不上网

请教一下大佬们!如题,想用MAX30205模块做一个温度计。经过测试,硬件都是好的,但是始终连接不上Blinker APP,串口显示如下:
__       __                __
/\ \   /\ \    __      /\ \            v0.3.4
\ \ \___ \ \ \/\_\    ___\ \ \/'\      __   _ __   
\ \ '__`\\ \ \ \/\ \ /' _ `\ \ , <    /'__`\/\`'__\
\ \ \L\ \\ \ \_\ \ \/\ \/\ \ \ \\`\ /\__/\ \ \./
   \ \_,__/ \ \__\\ \_\ \_\ \_\ \_\ \_\ \____\\ \_\
    \/___/   \/__/ \/_/\/_/\/_/\/_/\/_/\/____/ \/_/
    To better use blinker with your IoT project!
    Download latest blinker library here!
    => https://github.com/blinker-iot/blinker-library

_aliType:
_duerType:
_miType:
_authKey: 1fb8363254dd
Connecting to TP-LINK_5C4C
ESP8266_MQTT initialized...

===========================================================
================== Blinker Timer loaded! ==================
Warning!EEPROM address 1536-2431 is used for Blinker Timer!
============= DON'T USE THESE EEPROM ADDRESS! =============
===========================================================

countdown state: false
_cdRunState: 0
_totalTime: 0
_runTime: 0
_action:
loop state: false
_lpRunState: 0
_times: 0
_tri_times: 0
_time1: 0
_action1:
_time2: 0
_action2:
_lpData: 0
Temperature: 256.00 *C
WiFi Connected.
IP Address:
192.168.0.193
Temperature: 256.00 *C
begin: https://iot.diandeng.tech/api/v1 ... uthKey=1fb8363254dd &version=0.1.0
GET... code: 400
reply was:
==============================

==============================
ERROR: Maybe you have put in the wrong AuthKey!
ERROR: Or maybe your request is too frequently!
ERROR: Or maybe your network is disconnected!


代码如下:
#define BLINKER_WIFI
#include <Blinker.h>
#include <Wire.h>
#include "ClosedCube_MAX30205.h"

ClosedCube_MAX30205 max30205;

BlinkerNumber TEMP("temp");

char ssid[] = "TP-LINK_4B5B";
char pswd[] = "12345421";
char auth[] = "1hz8379490ca ";

float temp_read = 0;

void setup(void)
{
Serial.begin(115200);

BLINKER_DEBUG.stream(Serial);
BLINKER_DEBUG.debugAll();
Blinker.begin(auth,ssid,pswd);
Blinker.attachHeartbeat(heartbeat);

max30205.begin(0x48);
}


void loop()
{
Blinker.run();

float t = max30205.readTemperature();
if (isnan(t))
{
    BLINKER_LOG("Failed to read from DHT sensor!");
}
else
{

    BLINKER_LOG("Temperature: ", t, " *C");
    temp_read = t;
}
Blinker.delay(100);
}

void heartbeat()                  //心跳包
{

if (temp_read< 15)
{
    TEMP.color("#1E90FF");//蓝
    TEMP.unit("℃(寒冷)");
}
else if (temp_read> 25)
{
    TEMP.color("#DC143C");//红
    TEMP.unit("℃(炎热)");
}
else
{
    TEMP.color("#00DE00");//绿
    TEMP.unit("℃(舒适)");
}
TEMP.print(temp_read );
}




奈何col 发表于 2020-6-10 15:45

请先测试例程
页: [1]
查看完整版本: Blinker MAX30205连不上网