MCPcopy Create free account
hub / github.com/DanielOgorchock/ST_Anything / init

Method init

Arduino/libraries/SmartThings/SmartThingsThingShield.cpp:318–340  ·  view source on GitHub ↗

Initialize SmartThings Thingshield Library

Source from the content-addressed store, hash-verified

316 /// Initialize SmartThings Thingshield Library
317 //*******************************************************************************
318 void SmartThingsThingShield::init(void)
319 {
320 unsigned long tmpTime = millis();
321 do
322 {
323 //updateNetworkState();
324 run();
325 delay(10);
326 updateNetworkState();
327 } while ((_networkState != STATE_JOINED) && ((millis() - tmpTime) < 5000));
328
329 if (_isDebugEnabled)
330 {
331 if (_networkState != STATE_JOINED)
332 {
333 Serial.println(F("SmartThingsThingShield: Intialization timed out waiting for shield to connect."));
334 }
335 else
336 {
337 Serial.println(F("SmartThingsThingShield: Intialization Successful. Shield connected."));
338 }
339 }
340 }
341
342
343 //*****************************************************************************

Callers

nothing calls this directly

Calls 1

printlnMethod · 0.80

Tested by

no test coverage detected