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

Method run

Arduino/libraries/ST_Anything/Everything.cpp:177–205  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175 }
176
177 void Everything::run()
178 {
179 updateSensors(); //call each st::Sensor object to refresh data
180
181 #ifndef DISABLE_SMARTTHINGS
182 SmartThing->run(); //call the ST Shield Library to receive any data from the ST Hub
183 #endif
184
185 #if defined(ENABLE_SERIAL)
186 readSerial(); //read data from the Arduino IDE Serial Monitor window (useful for debugging sometimes)
187 #endif
188
189 sendStrings(); //send any pending updates to ST Cloud
190
191 #ifndef DISABLE_REFRESH //Added new check to allow user to disable REFRESH feature - setting is in Constants.h)
192 if ((bTimersPending == 0) && ((millis() - refLastMillis) >= long(Constants::DEV_REFRESH_INTERVAL) * 1000)) //DEV_REFRESH_INTERVAL is set in Constants.h
193 {
194 refLastMillis = millis();
195 refreshDevices(); //call each st::Device object to refresh data (this is just a safeguard to ensure the state of the Arduino and the ST Cloud stay in synch should an event be missed)
196 }
197 #endif
198
199 if((debug) && (millis()%60000==0) && (millis()!=lastmillis))
200 {
201 lastmillis = millis();
202 Serial.print(F("Everything: Free Ram = "));
203 Serial.println(freeRam());
204 }
205 }
206
207 bool Everything::sendSmartString(String &str)
208 {

Callers

nothing calls this directly

Calls 3

freeRamFunction · 0.85
printMethod · 0.80
printlnMethod · 0.80

Tested by

no test coverage detected