MIT App Inventor and 100+ esp32, how could I do this?!

Ok: Now that you invoke the Scientific Approach :alembic: :test_tube: :petri_dish: :dna: :microscope: :telescope: :satellite: :syringe: :drop_of_blood: :pill: :toolbox: :xray: :stethoscope:

  • Fulfilling our fate i'm heeding the call

1- For each (100) Esp32 you have an X (10 or 1000) of parameters, thats means that you have a relation 1 to Many or Many to Many [depending on the approach].

2- Instead triying to show them all (and they parameters) in one screen, you need to think ¿what is the dominant value that i need to show? (¿The Esp32 or parameters?).

3- when you get the answer of that question, use this approach:

  • Use a backend as service like Supabase, to ensure that all Esp32 are connected and in real time

  • Use this Pager Extension to list them all (parameters or Esp32).

  • Use Dynamic Components to show all the secondary values.

  • UDP protocol conection, etc.

  • Bluetooth only can conect 5 devices (in certain tablets [expensives ones]) without lossing conections or packets.

  • In that way you can list all the ESP32 and name it, ex; Motors Room, Alarms, etc. and they parameters like; voltage imput, voltaje output, voltage variance, light sensors, humidity sensors, etc.

Example:

Esp32 as dominant
  • List all the Esp32 on your pager header & Horizontal scroll Arrangement; so every time that one of them it's selected, the pager show all the parameters Like: Volatje, Wats, Leds on/off, Motors, etc... in the Vertical scroll Arrangement.

  • Use the id of the component clicked to INSERT, MODIFY, DELETE, ETC. the data or send message to an especific ESP32 to shoutdown or something.

Parameters are dominant
  • In this case the pager header need to be the parameters and list in the vertical scroll

  • May be that you have more Esp32 than parameters to show, ex; 100+ Esp32 and 10 or 30 parameters.

  • May be its more important have listed all the Light sensors and acced to a particular Esp32 (to find errors, see the lights are all ON, etc.)

  • Likewise, from the database you can manage all the logic through functions and triggers, so that the app weighs little and does what it should do.

Take into account that the cell phone or tablet where you run has limited resources (ram memory, storage, graphics, etc.)

but the server side is much more optimized and has enormous amounts of resources for the scalability of any project, as well as the security of always being online.

  • I could send you an AiA resolving all the doubts that occur to you, but I could only send you on Wednesday or Thursday of this week (at the time of this post, here in Argentina :argentina: it is Sunday 3:30 pm).

"...I guess it's tempting to think that if the only tool you have is a hammer, you can treat anything like a nail...."

Maslow - The Psychology of Science (1966)

  • For this reason, it is important to know each and every one of the tools that exist and we have (or not) at hand.
  • Science is a lot of optimization and reduction of resource consumption (less is more), just like nature. That's why "easy ways out" usually consume a lot of resources, causing the system to crash.

If you have 100 Esp32 and each of them has 30 parameters, which send/store information every 1 minute, you have 3000 data of different byte lengths, trying to enter at the same time on your cell phone/tablet (per minute), scale it to an hour, a day, etc.
The energy consumed by Bluetooth would be absurdly high, the signal band would have to be large and... the life cycle of the battery?

You need to optimize.

1 Like