| 174 | } |
| 175 | |
| 176 | void init() |
| 177 | { |
| 178 | Serial.begin(SERIAL_BAUD_RATE); // 115200 by default |
| 179 | Serial.systemDebugOutput(false); // Debug output to serial |
| 180 | |
| 181 | spiffs_mount(); // Mount file system, in order to work with files |
| 182 | |
| 183 | ActiveConfig = loadConfig(); |
| 184 | |
| 185 | // Select control line |
| 186 | pinMode(CONTROL_PIN, OUTPUT); |
| 187 | |
| 188 | // DHT sensor start |
| 189 | dht.setup(DHT_PIN, DHTesp::DHT11); |
| 190 | |
| 191 | lcd.begin(16, 2); |
| 192 | lcd.backlight(); |
| 193 | lcd.createChar(1, icon_termometer); |
| 194 | lcd.createChar(2, icon_water); |
| 195 | lcd.createChar(3, celsius); |
| 196 | lcd.createChar(4, icon_retarrow); |
| 197 | lcd.createChar(5, icon_clock); |
| 198 | lcd.createChar(6, icon_cross); |
| 199 | lcd.createChar(7, icon_check); |
| 200 | |
| 201 | WifiStation.config(ActiveConfig.NetworkSSID, ActiveConfig.NetworkPassword); |
| 202 | WifiStation.enable(true); |
| 203 | WifiAccessPoint.enable(false); |
| 204 | |
| 205 | WifiEvents.onStationConnect(connectOk); |
| 206 | WifiEvents.onStationDisconnect(connectFail); |
| 207 | WifiEvents.onStationGotIP(gotIP); |
| 208 | |
| 209 | procTimer.initializeMs<5000>(process).start(); |
| 210 | process(); |
| 211 | } |
nothing calls this directly
no test coverage detected