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

Function init

samples/MeteoControl_mqtt/app/application.cpp:47–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47void init()
48{
49 Serial.begin(SERIAL_BAUD_RATE); // 115200 by default
50
51 Wire.pins(4, 5); // SDA, SCL
52 Wire.begin();
53
54 // initialization config
55 mqtt.setMessageHandler(onMessageReceived);
56
57 BMPinit(); // BMP180 sensor initialization
58 SIinit(); // HTU21D sensor initialization
59
60 WifiStation.config(WIFI_SSID, WIFI_PWD);
61 WifiStation.enable(true);
62 WifiEvents.onStationGotIP(gotIP);
63 WifiAccessPoint.enable(false);
64 WDT.enable(false); //disable watchdog
65}

Callers

nothing calls this directly

Calls 8

BMPinitFunction · 0.85
SIinitFunction · 0.85
onStationGotIPMethod · 0.80
beginMethod · 0.45
pinsMethod · 0.45
setMessageHandlerMethod · 0.45
configMethod · 0.45
enableMethod · 0.45

Tested by

no test coverage detected