Update the analog_input example
using namespace sensesp;
// SensESP builds upon the ReactESP framework. Every ReactESP application
-// defines an "app" object vs defining a "main()" method.
-ReactESP app([]() {
+// must instantiate the "app" object.
+reactesp::ReactESP app;
+
+// The setup function performs one-time application initialization.
+void setup() {
// Some initialization boilerplate when in debug mode...
#ifndef SERIAL_DEBUG_DISABLED
@@ -73,4 +76,10 @@ ReactESP app([]() {
// Start the SensESP application running
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();
+}
