How to use an app to send / change micocontroller integer values?

Hello, I previously had success (with much assistance) creating a program that can control air conditioners, heaters, humidifiers, etc in unison to maintain the conditions of a room as desired. This was my first-ever Arduino project.

I would like to create "version 2" of this program - the same function, but able to be reprogrammed by a companion app created via MIT App Inventor in terms of the temperature and humidity settings.

What is the best way to accomplish this? (From the Arduino side, MIT App side is surprisingly straightforward.)

I will ultimately need to be sending / changing 7 integers, all numerical.

As I see it there are two approaches:

  • Send all 7 data sets from the app to the controller as a string and parse the values. Reprogram every integer every time the data is received, even if they're "reprogrammed" to the same value they're already at.

  • Send each data set individually, only when the value is changed in the app but otherwise leaving it alone. Probably done by labeling each value and enacting the appropriate change based on the label (which would require distinguishing the text-based portion of the data set sent from the app from the numerical portion which... seems difficult?).

I'm leaning towards the first option but because I have no real background in coding, and will need learn every step of the way regardless of which approach I take (likely bugging this forum for help in the process), I figured I should get guidance on which approach is most sensible before proceeding.

I have done some research already to be clear - servo arms seem the most analogous to what I'm doing here, and I have read "Serial Input Basics" thread but waiting on Bluetooth-capable microcontroller to test.

If the integers will be stored in EEPROM, then the second option is best. A limited number of writes is allowed.

You will want to follow the Serial Input Bascs tutorial and parse a string in either case.

7101334:

  • Send all 7 data sets from the app to the controller as a string and parse the values. Reprogram every integer every time the data is received, even if they're "reprogrammed" to the same value they're already at.

I favour sending all the values even if some don't change because there will be no confusion about which value is which.

There is no need to update a value that is the same as what is stored from the previous time.

Separately ...
If you are only sending data occasionally it would probably be a good idea to include in your App the ability to receive a message from the Arduino to confirm that the data was received correctly.

...R