feat(server): ⚗️ update wifi settings to test on simulator
!wifi settings
This commit is contained in:
parent
5819c6174c
commit
ff40bcc62a
|
@ -16,8 +16,11 @@
|
|||
#define IN4b 21
|
||||
|
||||
// Paramètres de connexion wifi :
|
||||
const char *ssid = "ESP32";
|
||||
const char *password = "test12345";
|
||||
// const char *ssid = "ESP32";
|
||||
// const char *password = "test12345";
|
||||
// For simulator only
|
||||
const char *ssid = "Wokwi-GUEST";
|
||||
const char *password = "";
|
||||
|
||||
// Temps d'attente entre deux impulsions :
|
||||
int delayTime = 3;
|
||||
|
@ -169,11 +172,24 @@ void setGlobals(String commandName, float commandValue)
|
|||
|
||||
void connectWiFi()
|
||||
{
|
||||
WiFi.mode(WIFI_AP);
|
||||
WiFi.softAP(ssid, password);
|
||||
Serial.print("[+] AP Created with IP Gateway ");
|
||||
Serial.println(WiFi.softAPIP());
|
||||
Serial.println("");
|
||||
// For simulator only
|
||||
WiFi.mode(WIFI_STA);
|
||||
WiFi.begin(ssid, password);
|
||||
if (WiFi.waitForConnectResult() != WL_CONNECTED)
|
||||
{
|
||||
Serial.printf("WiFi Failed!\n");
|
||||
return;
|
||||
}
|
||||
Serial.println(" Connected!");
|
||||
|
||||
Serial.print("IP Address: ");
|
||||
Serial.println(WiFi.localIP());
|
||||
|
||||
// WiFi.mode(WIFI_AP);
|
||||
// WiFi.softAP(ssid, password);
|
||||
// Serial.print("[+] AP Created with IP Gateway ");
|
||||
// Serial.println(WiFi.softAPIP());
|
||||
// Serial.println("");
|
||||
}
|
||||
|
||||
void chooseCommand()
|
||||
|
|
Loading…
Reference in a new issue