aim: esp8266 as client to get real-time data from a website and display on esp8266 ... ·...
TRANSCRIPT
![Page 1: Aim: ESP8266 as Client to get Real-time data from a website and display on ESP8266 ... · 2018-06-11 · Aim: ESP8266 as Client to get Real-time data from a website and display on](https://reader033.vdocument.in/reader033/viewer/2022052719/5f07f7cb7e708231d41faa00/html5/thumbnails/1.jpg)
Aim:ESP8266asClienttogetReal-timedatafromawebsiteanddisplayonESP8266Client(PCTerminal)
ThisexamplerequiresinternetconnectiontoyourPC&MobileasaccessPoint(AP)
1. Gotothewebsiteyou’reinterestedingettingrealtimedatafrom.Inthiscase,wewanttimefromwww.timeanddate.comViewthesitecode.
• Selectthetime,17:29:23,rightclickandselect“Inspect”.Aprogramlinewillbehighlightedinthecode.CopyitsX-path.
![Page 2: Aim: ESP8266 as Client to get Real-time data from a website and display on ESP8266 ... · 2018-06-11 · Aim: ESP8266 as Client to get Real-time data from a website and display on](https://reader033.vdocument.in/reader033/viewer/2022052719/5f07f7cb7e708231d41faa00/html5/thumbnails/2.jpg)
Aim:Createaproject(ApplicationProgrammingInterface(API)usingwww.thingspeak.comtoextracttheselectedportionofdatafromwww.timeanddate.comandsendittotheclient(ESP8266)
2. Gotowww.thingspeak.com,andmakeanaccountthere.Gotoapps>ThingHTTP,andselect“newThingHTTP”
3. Giveasuitablename.
4. PastetheURL{https://www.timeanddate.com/worldclock/india/mumbai}
5. changeHTTPversion{1.0}
6. pastethecopiedX-pathinparsestring{//*[@id="ct"]}
7. Andsave.
8. NowyourURLisgenerated.
![Page 3: Aim: ESP8266 as Client to get Real-time data from a website and display on ESP8266 ... · 2018-06-11 · Aim: ESP8266 as Client to get Real-time data from a website and display on](https://reader033.vdocument.in/reader033/viewer/2022052719/5f07f7cb7e708231d41faa00/html5/thumbnails/3.jpg)
GEThttps://api.thingspeak.com/apps/thinghttp/send_request?api_key=Y0CZZZU9OMX2DZSS
• Onsearchingonnewwindowbrowser:https://api.thingspeak.com/apps/thinghttp/send_request?api_key=Y0CZZZU9OMX2DZSS
real time data is displayed.
3. Now open Real Term Connect ESP8266 to access point:
AT+CWMODE=3 ( 3-both modes simultaneously)
AT+CWLAP (displays list of available Wi-Fi networks)
AT+CWJAP=”ysrao”,”12345678” (to join a Wi-Fi network)
AT+CIPSTART=”TCP”,”api.thingspeak.com”,80 (setup TCP connection & link of the data for download)
Rearrange the URL from Thinhspeak: https://api.thingspeak.com/apps/thinghttp/send_request?api_key=3FWU2IGEA0Z3F3Y9 to
GET /apps/thinghttp/send_request?api_key=3FWU2IGEA0Z3F3Y9 HTTP/1.0\r\nHost:api.thingspeak.com\r\n\r\n
From http://www.lettercount.com/ find out the number of characters (number of characters in
GET /apps/thinghttp/send_request?api_key=3FWU2IGEA0Z3F3Y9 HTTP/1.0\r\nHost:api.thingspeak.com\r\n\r\n are 101-6 = 95)
![Page 4: Aim: ESP8266 as Client to get Real-time data from a website and display on ESP8266 ... · 2018-06-11 · Aim: ESP8266 as Client to get Real-time data from a website and display on](https://reader033.vdocument.in/reader033/viewer/2022052719/5f07f7cb7e708231d41faa00/html5/thumbnails/4.jpg)
AT+CIPSEND=95
On receiving “>” as output, type
GET /apps/thinghttp/send_request?api_key=3FWU2IGEA0Z3F3Y9 HTTP/1.0\r\nHost:api.thingspeak.com\r\n\r\n