当前位置:网站首页>[esp8266 - 01s] obtenir la météo, Ville, heure de Beijing
[esp8266 - 01s] obtenir la météo, Ville, heure de Beijing
2022-06-23 18:01:00 【Un bol de tofu.】
Parlez d'abord des problèmes rencontrés lors du prochain débogage,UtiliserTCPSimulation de transmissionHTTP GETUne note sur la demande:
- C'est envoyé directement àESP8266Quand j'ai frappé
\r\nEst invalide!!!!
Qu'est - ce que ça veut dire?,UtiliserCIPSENDCommande ouMode de transmissionLes caractères d'évasion ne sont pas pris en charge lors de l'envoi des données.............
Ça va aller.,Le compilateur est pris en charge,Si le module supporte,Il va s'échapper deux fois en tapant sur le Code.............
Il y a aussi un problème de débogage,C'est qu'un assistant de port série ne peut pas simuler plusieurs lignes avec une seule ligne de texte en contournant les caractères,Ah!,Pas besoin de plus d'un envoi,Tu ferais mieux d'aller à l'intérieur et de frapper à la voiture..........
- Connexionwifi
AT+CWMODE=1
AT+CWJAP="wifiNom","wifiMot de passe"
Obtenir l'heure de Pékin
- Remarque cochez envoyer une nouvelle ligne..
AT+CIPSTART="TCP","quan.suning.com",80
AT+CIPSEND=42
GET http://quan.suning.com/getSysTime.do
Les réponses sont les suivantes::
- .Remarquez qu'il y a des moments où il y a beaucoup de choses qui reviennent dans le désordre ,Je ne sais pas pourquoi, Aucune autre interface appropriée n'a été trouvée ,Un petit ami qui sait peut laisser un message.
Obtenir la météo
- D'abord.www.tianqiapi.comNuméro de compte enregistré,Et ensuite
appidEtappsecret
AT+CIPSTART="TCP","tianqiapi.com",80
AT+CIPSEND=77
GET https://tianqiapi.com/api?version=v61&appid=******&appsecret=******
Les réponses sont les suivantes::
Après décodage, c'est comme ça , Il y a encore beaucoup d'informations :
{
"cityid": "101180101",
"date": "2022-06-18",
"week": "Samedi",
"update_time": "21:23",
"city": "Zhengzhou",
"cityEn": "zhengzhou",
"country": "Chine",
"countryEn": "China",
"wea": "Nuageux",
"wea_img": "yun",
"tem": "33",
"tem1": "37",
"tem2": "26",
"win": "Vent du Sud - est",
"win_speed": "2Niveau",
"win_meter": "5km/h",
"humidity": "34%",
"visibility": "30km",
"pressure": "988",
"air": "106",
"air_pm25": "26",
"air_level": "Pollution légère",
"air_tips": "Les enfants、 Les personnes âgées et les maladies cardiaques 、 Les personnes atteintes de maladies respiratoires devraient réduire au minimum les activités de plein air qui consomment beaucoup d'énergie physique .",
"alarm": {
"alarm_type": "Haute température",
"alarm_level": "Orange",
"alarm_title": " La province de Henan émet un avertissement orange à haute température ",
"alarm_content": "Station météorologique de la province de Henan2022Année6Mois18Jour17Heure00 Continuer à émettre des alertes orange à haute température :Prévisions6Mois19Jour et nuit,Zhengzhou、Kaifeng、Luoyang(La ville principale,District de Yanshi,District de Mengjin,Xin'an County,Comté de Ruyang,Comté de Yiyang,Préfecture d'ichuan,District d'Ibin)、Pingdingshan、Anyang、Crane Wall、Xinxiang、Jiaozuo、Xu Chang、Luohe、Shangqiu、Zhoukou、Zhumadian(Xiping County,Shangcai County,Comté de Pingyu,Suiping County)、Jiyuan、 La température maximale de Puyang va augmenter 37℃Ci - dessus,Dont Zhengzhou(La Rue haute,Yingyang City)、Kaifeng(QIXIAN,Tongxu County)、Anyang、Crane Wall、Xinxiang(Red Flag District,District de Weibin,Fengquan District,Zone pastorale,Comté de Xinxiang,Comté de Huojia,Weihui City,Ville de Huixian)、Jiaozuo(La ville principale,Xiuwu County,Comté de fraternité,Wuzhi County, Zone de démonstration de l'intégration urbaine - rurale )、Puyang、Shangqiu(La ville principale,Le comté des droits civiques,Suixian,Comté de Ningling) La température maximale monte à 40℃Ci - dessus.\n6Mois20Jour et nuit,Zhengzhou、Luoyang、Pingdingshan、Xu Chang、Sanmenxia、Nanyang、Xinyang(Zone du pont plat,Comté de Luoshan,Gushi County,Huaibin County,Shixian)、Zhoukou、Zhumadian、Jiyuan、Kaifeng、Anyang、Crane Wall、Xinxiang、Jiaozuo、Puyang、Luohe、 La température maximale de Shangqiu va augmenter 37℃Ci - dessus,Dont Zhengzhou(La ville principale,La Rue haute,Comté de Zhongmou,Zone aéroportuaire,Gongyi City,Yingyang City,Xinzheng City)、Kaifeng、Luoyang(La vieille ville,Zone de travail ouest,Région de la rivière Luan,Jianxi District,District de Yanshi,District de Mengjin,Lolong District,District d'Ibin)、Pingdingshan(District de Weidong,Yexian,Zone de haute technologie)、Anyang、Crane Wall、Xinxiang、Jiaozuo、Puyang、Xu Chang、Luohe、Shangqiu、Zhoukou(Chuanhui District,"
},
"aqi": {
"update_time": "21:22",
"cityid": "101180101",
"city": "Zhengzhou",
"cityEn": "zhengzhou",
"country": "Chine",
"countryEn": "China",
"air": "106",
"air_level": "Pollution légère",
"air_tips": "Les enfants、 Les personnes âgées et les maladies cardiaques 、 Les personnes atteintes de maladies respiratoires devraient réduire au minimum les activités de plein air qui consomment beaucoup d'énergie physique .",
"pm25": "26",
"pm25_desc": "Oui.",
"pm10": "41",
"pm10_desc": "Oui.",
"o3": "212",
"o3_desc": "Pollution légère",
"no2": "6",
"no2_desc": "Oui.",
"so2": "6",
"so2_desc": "Oui.",
"co": "-",
"co_desc": "-",
"kouzhao": " Il est recommandé de porter un masque ",
"yundong": " L'exercice n'est pas recommandé ",
"waichu": " Il n'est pas bon de sortir. ",
"kaichuang": " Réduire le temps d'ouverture des fenêtres ",
"jinghuaqi": " Éteignez le Purificateur "
}
}
Outils
- Un testWEBSite web demandéGetman.cn
边栏推荐
- Goframe framework: fast implementation of service end flow limiting Middleware
- 《AN4190应用笔记 天线选择指南》——天线理论2
- How code 39 check bits are calculated
- Answer 02: why can Smith circle "allow left string and right parallel"?
- Revil - blackmail Virus Emergency Response
- 12 initialization of beautifulsoup class
- Digital intelligent supply chain collaboration solution for new energy industry
- [JS reverse hundred examples] pedata encryption information and zlib Application of gunzipsync()
- How to create a three elimination game
- The principle of MySQL index algorithm and the use of common indexes
猜你喜欢

全局组织结构控制之抢滩登陆

客服系统搭建教程_宝塔面板下安装使用方式_可对接公众号_支持APP/h5多租户运营...

Performance test bottleneck tuning in 10 minutes! If you want to enter a large factory, you must know

论文阅读 (48):A Library of Optimization Algorithms for Organizational Design

MySQL transaction and its characteristics and locking mechanism

暂停更新公告—行走的皮卡丘

Wechat applet: time selector for the estimated arrival date of the hotel

Alien world, real presentation, how does the alien version of Pokemon go achieve?

FPN characteristic pyramid network

qYKVEtqdDg
随机推荐
How do I write a small program that can automatically edit new year greetings
Interpretation of eventbus source code
Cryptography involved in IOT device end
January 5, 2022: there are four kinds of rhythms: AABB, ABAB and ABB
Ctfshow PHP features
Year end: the "time value" and business methodology of live broadcast E-commerce
Best practices cloud development cloudbase content audit capability
10分钟后性能测试瓶颈调优!想进大厂这个必须会
单火线设计系列文章10:拓展应用-单火开关实现双控
浅谈5类过零检测电路
手机开户一般哪个证券公司好?在线开户安全么?
Answer 01: why can Smith circle "allow left string and right parallel"?
MySQL事务提交流程
B. AND 0, Sum Big-Codeforces Round #716 (Div. 2)
对抗攻击与防御 (2):对抗样本的反制策略
AMQP protocol
[mae]masked autoencoders mask self encoder
Latex使用\usepackage{hyperref}报错:paragraph ended before [email protected]@link was complete
Answer 02: why can Smith circle "allow left string and right parallel"?
论文阅读 (47):DTFD-MIL: Double-Tier Feature Distillation Multiple Instance Learning for Histopathology..