MCPcopy Create free account
hub / github.com/SmingHub/Sming / init

Function init

samples/MeteoControl/app/application.cpp:176–211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174}
175
176void 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}

Callers

nothing calls this directly

Calls 15

spiffs_mountFunction · 0.85
systemDebugOutputMethod · 0.80
backlightMethod · 0.80
createCharMethod · 0.80
onStationConnectMethod · 0.80
onStationDisconnectMethod · 0.80
onStationGotIPMethod · 0.80
loadConfigFunction · 0.70
processFunction · 0.70
pinModeFunction · 0.50
beginMethod · 0.45
setupMethod · 0.45

Tested by

no test coverage detected