| ... | ... |
@@ -22,7 +22,7 @@ bool writeConfigFile(); |
| 22 | 22 |
|
| 23 | 23 |
// Setup function |
| 24 | 24 |
void setup() {
|
| 25 |
- // Put your setup code here, to run once |
|
| 25 |
+ pinMode(LED_BUILTIN, OUTPUT); |
|
| 26 | 26 |
Serial.begin(115200); |
| 27 | 27 |
#if DEBUG |
| 28 | 28 |
Serial.println("\n Starting");
|
| ... | ... |
@@ -107,6 +107,12 @@ bool writeConfigFile() {
|
| 107 | 107 |
File f = SPIFFS.open("/config.json", "w");
|
| 108 | 108 |
if (!f) {
|
| 109 | 109 |
Serial.println("Instalation failed! Write error!");
|
| 110 |
+ while (true){
|
|
| 111 |
+ digitalWrite(LED_BUILTIN, HIGH); // ledul face blink semn ca sunt probleme |
|
| 112 |
+ delay(400); |
|
| 113 |
+ digitalWrite(LED_BUILTIN, LOW); |
|
| 114 |
+ delay(400); |
|
| 115 |
+ } |
|
| 110 | 116 |
return false; |
| 111 | 117 |
} |
| 112 | 118 |
|
| ... | ... |
@@ -116,6 +122,7 @@ bool writeConfigFile() {
|
| 116 | 116 |
f.close(); |
| 117 | 117 |
|
| 118 | 118 |
Serial.println("\nDevice updated!");
|
| 119 |
+ digitalWrite(LED_BUILTIN, HIGH); // ledul ramane aprins semn ca s-au scris credentialele |
|
| 119 | 120 |
return true; |
| 120 | 121 |
} |
| 121 | 122 |
|