Your Clock Timer should be polling the BlueTooth input stream and adding each incoming value from the Arduino along with the current SystemTime to a two column table (list of lists), the same way my sample code was taking current Slider thumb values.
How many items per message are arriving in the BlueTooth data stream?
You have not shown the new code.
Your last code shows two variables (differential voltage and rUnknown arriving with an elapsed time.
I have no idea how to convert those to ppm.
You're the expert.
There is a list block to take a table (list of lists) and convert it into a CSV text of a table.
The File component can be used to write text to a file.
The Chart or ChartData component might have blocks to retrieve those.
Assigning a value to a Label.Text or Textbox.Text should be no problem for you by now, once you have the value.
If you want to get min and max from lists, check my sample graph for the calls to Min In List and Max In List.
If you want min and max from columns of a table, use the list block that can make a new list out of an old list by selecting a column from each row.
Thanks for advice
Actually the meaning from this work to learn new skills, so I am doing it myself.
I will provide the scheme of my app and the new Arduino code that I did
First of all, thank you so much for helping me. My target from this project is to learn and improve my work; as you know, additional skills can increase the offers in the future.
I connected the Wheatstone bridge to R1= 30k Ohms, R2= 30 k Ohms, R3= 30 k Ohms, R4= 30 k Ohms, so the unknown resistance is also 30k Ohms
The ESP32 is reading the accurate value of resistance.
Thanks, the photo with green numbers was before I changed the code to only unknown resistance; please check my app chart, and you will find that I only receive the resistance.
What magician's hat did you pull Rair and RG (not Rg) out of?
The rising readings extraction process is supposed to be based on the just calculated R0.Text and Rg.Text values.
Also, R(any suffix) is supposed to be a resistance value in your naming scheme, right?
Then why do you call a time difference a name starting in R, and overlapping with the maximal resistance value of the graph?
Unlike math, where you are constantly making diagrams on blackboards or precious scraps of paper, where space is limitted and your target audience is capable of remembering, for example, that V is for Voltage, and they don't have the patience to listen to you spell out the full name, computer code has a different set of priorities.
Computer code requires readability, redundancy, and self evidency in its variable and component names. There's lots of room on the screen for full names that include type (Label/Textbox/List/...), Unit Of Measure (Volts/Ohms/Seconds/...), context (First/Maximum/Total/Input/Output...), and semantics (Name/Address/PhoneNumber/...).
You only need to set a name once , in the Designer of Blocks Editor' global or local variable init blocks. From then on, the full name is available through pallettes and pulldowns, and via typeblocking.
That makes the code much less ambiguous and less error prone, exposing errors as common sense violations.
It makes code easier to read and to visually debug.
I apologize for this; I have only been using the MIT app for about a week or 10 days, and prior to that, I had no experience with it. I will follow your advice. Thanks.
Now I can adjust the min and max of the axes, but I need to make the x-axis as time to count by seconds to have resistance vs time, but it is the same. Also, I got R from ESP32, but I need the normal clock to count the time in seconds or milliseconds.
You must keep a global variable startMS with the value of Clock1.SystemTime for when you started taking readings.
The current number of seconds from start is the round of (Clock1.SystemTime - startMS) / 1000.
In the email copy of your post, there were blocks that don't appear in your board post, where you use the Clock Seconds(Instant) block. That's the wrong block to use, becuase it just shows the digital clock Seconds (00-59) of the current Instant.
Further block help would require a current aia export.
Thanks for your kind reply.
I removed it, but it's still the same, and also the stop button is not working to start analyzing the graph, so should I set it to disconnect the BLE?
Belalv6_2.aia (1.1 MB)
Thanks.
Please, screen 4 is working on ai companion, but when I download the APK file, it crashes; this is only for screen 4.
For the header of the gauge, I followed the advice, but it has the same issue as it is going to another position, including the project you mentioned before about the gauge, as it has the same problem. https://groups.google.com/g/mitappinventortest/c/k20NEzXSBy8/m/XzQis0IBBwAJ