mirror of
https://github.com/richonguzman/LoRa_APRS_iGate.git
synced 2026-03-18 19:24:49 +01:00
Network manager: wifi connect use LED
This commit is contained in:
parent
e0c6608055
commit
1ff5504956
|
|
@ -102,10 +102,19 @@ bool NetworkManager::connectWiFi(String ssid, String psk) {
|
|||
Serial.println("Attempting to connect to WiFi: " + ssid);
|
||||
WiFi.begin(ssid.c_str(), psk.c_str());
|
||||
|
||||
Serial.print("Connecting ");
|
||||
|
||||
int attempts = 0;
|
||||
while (!isWiFiConnected() && attempts < 20) {
|
||||
while (!isWiFiConnected() && attempts < 10) {
|
||||
delay(500);
|
||||
Serial.print(".");
|
||||
#ifdef INTERNAL_LED_PIN
|
||||
digitalWrite(INTERNAL_LED_PIN,HIGH);
|
||||
#endif
|
||||
Serial.print('.');
|
||||
delay(500);
|
||||
#ifdef INTERNAL_LED_PIN
|
||||
digitalWrite(INTERNAL_LED_PIN,LOW);
|
||||
#endif
|
||||
attempts++;
|
||||
}
|
||||
Serial.println();
|
||||
|
|
|
|||
Loading…
Reference in a new issue