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
|
#define IN4b 21
|
||||||
|
|
||||||
// Paramètres de connexion wifi :
|
// Paramètres de connexion wifi :
|
||||||
const char *ssid = "ESP32";
|
// const char *ssid = "ESP32";
|
||||||
const char *password = "test12345";
|
// const char *password = "test12345";
|
||||||
|
// For simulator only
|
||||||
|
const char *ssid = "Wokwi-GUEST";
|
||||||
|
const char *password = "";
|
||||||
|
|
||||||
// Temps d'attente entre deux impulsions :
|
// Temps d'attente entre deux impulsions :
|
||||||
int delayTime = 3;
|
int delayTime = 3;
|
||||||
|
@ -169,11 +172,24 @@ void setGlobals(String commandName, float commandValue)
|
||||||
|
|
||||||
void connectWiFi()
|
void connectWiFi()
|
||||||
{
|
{
|
||||||
WiFi.mode(WIFI_AP);
|
// For simulator only
|
||||||
WiFi.softAP(ssid, password);
|
WiFi.mode(WIFI_STA);
|
||||||
Serial.print("[+] AP Created with IP Gateway ");
|
WiFi.begin(ssid, password);
|
||||||
Serial.println(WiFi.softAPIP());
|
if (WiFi.waitForConnectResult() != WL_CONNECTED)
|
||||||
Serial.println("");
|
{
|
||||||
|
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()
|
void chooseCommand()
|
||||||
|
|
Loading…
Reference in a new issue