#include <ESP8266WiFi.h> #include "Virtuino_ESP_WifiServer.h" const char* ssid = "le_nom_de_votre_reseau_wifi"; const char* password = "le_mot_de_passe_de_votre_reseau_wifi"; WiFiServer server(8000); Virtuino_ESP_WifiServer virtuino(&server); void setup() { //----- Virtuino settings virtuino.DEBUG = true; // set this value TRUE to enable the serial monitor status virtuino.password = "1234"; // Set a password to your web server for more protection Serial.begin(9600); // Enable this line only if DEBUG=true delay(10); //----- NodeMCU module settings //----- prepare GPIO2 pinMode(2, OUTPUT); digitalWrite(2, 0); Serial.println("Connecting to " + String(ssid)); WiFi.mode(WIFI_STA); // Config module as station only. WiFi.begin(ssid, password); while (WiFi.status() != WL_CONNECTED) { delay(500); Serial.print("."); } Serial.println(""); Serial.println("WiFi connected"); Serial.println(WiFi.localIP()); server.begin(); Serial.println("Server started"); pinMode(D1, OUTPUT); pinMode(D2, OUTPUT); pinMode(D3, OUTPUT); pinMode(D4, OUTPUT); } void loop() { virtuino.run(); }