Say my access point code is this:
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
#include <EEPROM.h>
const char *ssid = "ESPapnew";
const char *password = "thereisnospoon";
ESP8266WebServer server(80);
void handleRoot() {
server.send(200, "text/html", "Hello, world!");
}
void setup() {
delay(1000);
WiFi.softAP(ssid, password);
server.on("/", handleRoot);
server.begin();
}
void loop() {
server.handleClient();
}
How should the code look like for the second module set up as the station for it to read that webpage and store "Hello world!" in a string variable for future use? I saw some examples with functions like wifi.send(), but I still have no idea how to implement it. It can also be set up like this: the server on the access point sends data to the server on the station when an event occurs (no matter what, a button is pressed, a url on the server is visited) and the station stores it in a variable. Thanks!