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

Arduino中文社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 1804|回复: 1

[已解答] Blinker MAX30205连不上网

[复制链接]
发表于 2020-6-10 12:44 | 显示全部楼层 |阅读模式
请教一下大佬们!如题,想用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

[108] _aliType:
[110] _duerType:
[112] _miType:
[113] _authKey: 1fb8363254dd
[116] Connecting to TP-LINK_5C4C
[123] ESP8266_MQTT initialized...
[123]
===========================================================
================== Blinker Timer loaded! ==================
Warning!EEPROM address 1536-2431 is used for Blinker Timer!
============= DON'T USE THESE EEPROM ADDRESS! =============
===========================================================

[150] countdown state: false
[151] _cdRunState: 0
[153] _totalTime: 0
[155] _runTime: 0
[157] _action:
[159] loop state: false
[160] _lpRunState: 0
[162] _times: 0
[164] _tri_times: 0
[165] _time1: 0
[167] _action1:
[169] _time2: 0
[170] _action2:
[172] _lpData: 0
[694] Temperature: 256.00 *C
[1205] WiFi Connected.
[1205] IP Address:
[1205] 192.168.0.193
[1226] Temperature: 256.00 *C
[1227] [HTTP] begin: https://iot.diandeng.tech/api/v1 ... uthKey=1fb8363254dd &version=0.1.0
[2469] [HTTP] GET... code: 400
[2474] reply was:
[2474] ==============================
[2474]
[2474] ==============================
[2474] ERROR: Maybe you have put in the wrong AuthKey!
[2477] ERROR: Or maybe your request is too frequently!
[2482] 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 );
  }





发表于 2020-6-10 15:45 | 显示全部楼层
请先测试例程
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

GMT+8, 2024-11-28 09:27 , Processed in 0.096034 second(s), 15 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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