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

Function init

samples/DS3232RTC_NTP_Setter/app/application.cpp:49–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47} // namespace
48
49void 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}

Callers

nothing calls this directly

Calls 9

systemDebugOutputMethod · 0.80
printlnMethod · 0.80
onStationGotIPMethod · 0.80
setTimeZoneMethod · 0.80
beginMethod · 0.45
pinsMethod · 0.45
enableMethod · 0.45
configMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected