Esp8266wifi Library - Project Guidance - Arduino Forum

yazan666: and i want to try to build my own program using the esp8266wifi library

In programming and electronics, it's extremely important to be precise. You'll do well to take the same approach here on the forum. There is no such thing as an "esp8266wifi library". There have been two popular libraries with similar names. One is the ESP8266WiFi library bundled with the ESP8266 core for Arduino. The other is the ESP8266wifi library, which is for controlling ESP8266 modules running the AT firmware. Because you were too lazy to press the shift key, I had to waste time looking for an on() function in both libraries. If you expect us to spend our time helping you for free, the least you could do is make the minimal effort to capitalize words correctly.

The on() function is actually part of the ESP8266WebServer library. Most of the library documentation for the ESP8266 core for Arduino is found here: https://arduino-esp8266.readthedocs.io/en/latest/index.html but for some reason the ESP8266WebServer library documentation is missing from those pages. You can find it here:

esp8266/Arduino/blob/master/libraries/ESP8266WebServer/README.rst

ESP8266 Web Server ================== The WebServer class found in ``ESP8266WebServer.h`` header, is a simple web server that knows how to handle HTTP requests such as GET and POST and can only support one simultaneous client. Usage ----- Class Constructor ~~~~~~~~~~~~~~~~~ .. code:: cpp ESP8266WebServer server(80); Creates the ESP8266WebServer class object. *Parameters:* This file has been truncated. show original

As for the ESP8266WiFi documentation, it is here: https://arduino-esp8266.readthedocs.io/en/latest/esp8266wifi/readme.html Generally the ESP8266 libraries attempt to follow the API of the standard Arduino libraries and only document the differences. You may find it useful to refer to the Arduino WiFi library reference pages in addition to the ESP8266WiFi documentation:

WiFi - Arduino Reference

The Arduino programming language Reference, organized into Functions, Variable and Constant, and Structure keywords.

Note how, in addition to spending my time to provide you with free help, I had the respect to use proper capitalization and punctuation.

Tag » Arduino Esp8266 Readthedocs