-->
Page 1 of 2

Confused by ESP8266WiFi.h

PostPosted: Sun Jul 01, 2018 11:05 pm
by 42etus
I'm just getting started with the ESP8266-12. I have been studying other people's code that uses the <ESP8266WiFi.h> library. The thing is that when I try to include the ESP8266WiFi library using the Arduino IDE into my code, I get this:

#include <ESP8266WiFi.h>
#include <ESP8266WiFiAP.h>
#include <ESP8266WiFiGeneric.h>
#include <ESP8266WiFiMulti.h>
#include <ESP8266WiFiScan.h>
#include <ESP8266WiFiSTA.h>
#include <ESP8266WiFiType.h>
#include <WiFiClient.h>
#include <WiFiClientSecure.h>
#include <WiFiServer.h>
#include <WiFiServerSecure.h>
#include <WiFiUdp.h>

I don't understand how to just get

#include <ESP8266WiFi.h>

Any help would be appreciated

Re: Confused by ESP8266WiFi.h

PostPosted: Mon Jul 02, 2018 5:09 pm
by McChubby007
That's the way the Arduino IDE works. It's fine.

Re: Confused by ESP8266WiFi.h

PostPosted: Mon Jul 02, 2018 5:19 pm
by 42etus
McChubby007 wrote:That's the way the Arduino IDE works. It's fine.


I don't understand your response.

How do I get just the one include, that is: <ESP8266WiFi.h> and leave out the others? It's obviously possible, as I see just the one in a lot of code.

Re: Confused by ESP8266WiFi.h

PostPosted: Mon Jul 02, 2018 9:44 pm
by rudy
Have a look at what is in ESP8266WiFi.h

https://github.com/esp8266/Arduino/blob ... 8266WiFi.h

Mostly includes.