Update the minimal_app example
@@ -27,7 +27,9 @@ const uint8_t output_pin2 = 21;
// with a jumper wire, you should see changes in the reported values on the
// serial console.
-ReactESP app([]() {
+ReactESP app;
+
+void setup() {
SetupSerialDebug(115200);
SensESPMinimalAppBuilder builder;
@@ -71,4 +73,10 @@ ReactESP app([]() {
});
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();
+}
