Update the temperature_sender example
@@ -56,8 +56,10 @@ class TemperatureInterpreter : public CurveInterpolator {
};
// SensESP builds upon the ReactESP framework. Every ReactESP application
-// defines an "app" object vs defining a "main()" method.
-ReactESP app([]() {
+// defines an "app" object.
+ReactESP app;
+
+void setup() {
// Some initialization boilerplate when in debug mode...
#ifndef SERIAL_DEBUG_DISABLED
@@ -167,4 +169,10 @@ ReactESP app([]() {
// Start the SensESP application running, which simply activates everything
// that's been set up above
sensesp_app->start();
-});
+}
+
+// The loop function is called in an endless loop during program execution.
+// It simply calls `app.tick()` which will then execute all reactions as needed.
+void loop() {
+ app.tick();
+}
