CODIGO: /* The server will set a GPIO pin depending on the request http://server_ip/gpio/0 will set the GPIO2 low, http://server_ip/gpio/1 will set the GPIO2 high server_ip is the IP address of the ESP8266 module, will be printed to Serial when the module is connected. Ha sido probado con ESP8266-ESP01S con Exito por Walter L.Campoamor Stursberg a 24 Julio 2021 */ #include <ESP8266WiFi.h> #ifndef STASSID #define STASSID "ID" #define STAPSK "PASSWORD" #endif const char* ssid = STASSID; const char* password = STAPSK; // Create an instance of the server // specify the port to listen on as an argument WiFiServer server(80); void setup() { Serial.begin(115200); // prepare LED pinMode(LED_BUILTIN, OUTPUT); digitalWrite(LED_BUILTIN, 0); // Connect to WiFi network Serial.println(); Serial.println(); Serial.print(F("Connecting to ")); Serial.println(ssid); WiFi.mode(WI...
Internet de las cosas ( IoT )