void init() { Serial.begin(SERIAL_BAUD_RATE); // 115200 by default Serial.systemDebugOutput(false); // Enable debug output to serial WifiStation.enable(false); WifiAccessPoint.enable(false); initDisplay(); ReadTemp.Init(DS_PIN); ReadTemp.StartMeasure(); displayTemps(); system_deep_sleep(30 * 1000 * 1000); }
void init() { if (USE_SERIAL) { Serial.begin(SERIAL_BAUD_RATE); // 115200 by default Serial.systemDebugOutput(true); // Debug output to serial Serial.println("booting up"); } //Setup temp sensors temperatureSensor.Init(TEMP_PIN); temperatureSensor.StartMeasure(); System.onReady(ready); WifiStation.config(WIFI_SSID, WIFI_PWD); WifiStation.enable(true); WifiAccessPoint.enable(false); // Run our method when station was connected to AP (or not connected) WifiStation.waitConnection(connectOk, 20, connectFail); // We recommend 20+ seconds for connection timeout at start }