-->
Page 1 of 1

Read data from a file on the internet

PostPosted: Tue Jan 17, 2017 6:40 am
by Powersoft
Hello,

I have a question how to read a data file.
Need to reed the content of "http://www.celestrack.com/NORAD/elements/stations.txt"
and store it in to a file.
Please can someone help me out with this topic ;)

Thanks for any help

Re: Read data from a file on the internet

PostPosted: Sun Jan 22, 2017 8:14 am
by jeffas
I suggest a search for: esp8266 web client
There's this one for Arduino, but it ought to work on ESP8266 by replacing the WiFi include with ESP8266WiFi:
https://www.arduino.cc/en/Tutorial/WiFiWebClient

That should help with reading the file, but as for "store it in to a file", I'm not sure what you mean. I believe it's possible to put some sort of file system on an ESP, but that isn't something that I know about. Maybe someone else can help with that aspect.

Re: Read data from a file on the internet

PostPosted: Sun Jan 22, 2017 2:36 pm
by gdsports
Docs for the SPIFFS file system which is inside the on-board SPI Flash. Most ESP12 boards have 4 Mbytes of Flash which can be organized as 1 Mbyte for program code and data and 3 Mbytes for SPIFFS files.

https://github.com/esp8266/Arduino/blob ... esystem.md

ESP8266 HTTP client examples.

https://github.com/esp8266/Arduino/tree ... t/examples