2021.04.20未完成的潮汐缸:ESP8266+blynk 使用云潮汐数据驱动优必选串口舵机。

superchat下载:
http://blynk.mpython.cn:8080/33qq2@qq.com_740545429_0_v0_1618994065413.csv.gz

海事网暂时关闭,使用云潮汐数据
1、每分钟根据潮高调整舵机角度(单线软串口);
2、每小时写入superchart记录数据;
3、重启时和每日0点访问云潮汐,更新潮高数据(https)。
4、云潮汐网页数据,去掉海事网json数据。每日潮高、潮时近似值,24小时潮高中选取的数据。

/*
1、blinker esp8266 ubtech串口总线舵机;
使用D8(15)PIN
#if defined(ESP8266)
#define D8 (15)
#define D5 (14)
#define D7 (13)
#define D6 (12)
#define RX (3)
#define TX (1)
#elif defined(ESP32)
#define D8 (5)
#define D5 (18)
#define D7 (23)
#define D6 (19)
#define RX (3)
#define TX (1)
#endif
2、变量说明:
String line; //保存网站返回的json数据(云潮汐不返回json);
String TdataTemp,TdataTempOK; //当前日期;查询网站数据用,是否已正确接收当前日期的数据。
int a[24]; //json数据接收a0-a23;cs0/cg0—cs3/cg3/海平面高度239cm共33个;
String aOK;//当前小时内是否已写入到superchart
3、使用3个组件说明:
***terminal:v2;
***Superchart:v0;第二个也是v0,方波形状显示,input 0–239–500;
***RTC;
*/
#include <BlynkSimpleEsp8266.h>//#include <BlynkSimpleEsp8266.h>//#include <BlynkSimpleEsp32.h>//
#define BLYNK_PRINT Serial

//#include <ESP8266WiFi.h>  
#include <WiFiClientSecure.h>
#include <TimeLib.h>  // https://github.com/PaulStoffregen/Time
#include <WidgetRTC.h>


#define STASSID "*******"
#define STAPSK  "********"
const char* ssid = STASSID;
const char* password = STAPSK;
char auth[] = "***********";

const char* host = "www.yunchaoxi.com";
const int httpsPort = 443;
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值