| 47 | } // namespace |
| 48 | |
| 49 | void init() |
| 50 | { |
| 51 | Serial.begin(SERIAL_BAUD_RATE); |
| 52 | Serial.systemDebugOutput(true); // Allow debug print to serial |
| 53 | Serial.println(_F("Sming DSRTC_NTP_SETTER started!")); |
| 54 | Wire.pins(SDA_PIN, SCL_PIN); |
| 55 | Wire.begin(); |
| 56 | |
| 57 | // Station - WiFi client |
| 58 | WifiStation.enable(true); |
| 59 | WifiStation.config(WIFI_SSID, WIFI_PWD); |
| 60 | WifiEvents.onStationGotIP(gotIP); |
| 61 | |
| 62 | // set timezone hourly difference to UTC |
| 63 | SystemClock.setTimeZone(2); // GMT+2 |
| 64 | |
| 65 | printTimer.initializeMs<2000>(onPrintSystemTime).start(); |
| 66 | } |
nothing calls this directly
no test coverage detected