What's wrong with my very simple sketch ??
Posted: Wed May 20, 2015 4:51 am
Hello,
I met a lot of problem to make an HTTP request with the ESP. So i try with a very very simple skectch, but i still have some troubles :
ESP connect to wifi network in about 2 sec and get an IP --> good. But next, i have no ping response, or the firsts 7~8 packet. Yet, the serial is displaying "3" (WL_CONNECTED).
Is it something wrong ?
Thanks (sorry if my english is bad)
I met a lot of problem to make an HTTP request with the ESP. So i try with a very very simple skectch, but i still have some troubles :
ESP connect to wifi network in about 2 sec and get an IP --> good. But next, i have no ping response, or the firsts 7~8 packet. Yet, the serial is displaying "3" (WL_CONNECTED).
Is it something wrong ?
Thanks (sorry if my english is bad)
Code: Select all
#include <WiFiUdp.h>
#include <WiFiClient.h>
#include <WiFiServer.h>
#include <ESP8266WiFi.h>
const char* ssid = "**********";
const char* password = "*********";
void setup() {
Serial.begin(9600);
delay(10);
WiFi.begin(ssid, password);
Serial.println("");
// Wait for connection
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.print("Connected to ");
Serial.println(ssid);
Serial.print("IP address: ");
Serial.println(WiFi.localIP());
}
void loop() {
delay(1000);
Serial.println(WiFi.status());
}