-->
Page 1 of 2

Webserver and client

PostPosted: Tue Sep 22, 2015 4:36 am
by zioax
I need to run a webserver on the esp, and also make a GET request to a server. Is it possible?

Re: Webserver and client

PostPosted: Fri Sep 25, 2015 8:08 pm
by digiajay
zioax wrote:I need to run a webserver on the esp, and also make a GET request to a server. Is it possible?


Yes it's possible. I have tried the same from Arduino environment.

Re: Webserver and client

PostPosted: Fri Sep 25, 2015 10:59 pm
by kolban
Do you have a preference in language you use for programming? Right now we seem to have:

* JavaScript
* LUA
* C
* Basic
* Lisp
* Python

Re: Webserver and client

PostPosted: Sat Oct 10, 2015 4:04 pm
by Fred Carnos
Using the Arduino IDE for ESP8266 and ESP8266WebServer.h, I have a server running on an ESP01 along with an ultrasonic distance module on pin 2 trigger out and pin 0 echo return. It all works fine and I can connect with the ESP running as a AP directly and also via my main WiFi router once the ESP01 has been given the SSID & password and made a connection using the allocated IP. I am using the server.on function to show distance data, set SSID, password etc all working fine. When I add code to create a WiFi Client and then connect to "data.sparkfun.com" it still compiles fine and runs on the ESP8266 but if I set it to start logging when it gets to the code:-

if (!client.connect(temp, httpPort)) {
Serial.println("connection failed");
return;
}
etc.

It never connects or reports a connection fail but hangs and the ESP reboots after ~3 seconds. I have tried defeating the watchdog but after ~8secs it still reboots. I posted a similar report no28812 but no one responded.

Any help or advice appreciated.

Fred.