How do you use a Wheatstone Bridge to calculate Resistance using Bluetooth?

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.

Belalv5 (2).aia (1.9 MB)

I see inconsistency between your Arduino code and your output stream.

Your Arduino code stops at just one reading per line:


It omits the first and second input parameters.
It looks like your source code was cut short.

Your terminal output shows 3 readings per line, separated by semicolons (';').
image

Be sure to split at ';' if building a table line by line from your input.

The clearest block images are those generated using the AI2 Helper mass download browser extension at

1 Like

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.

You know the difference between .TextColor and .Text?

Check the tool tips.


Same deal here.

1 Like

Sorry, Yes I know the difference
Thanks


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?

1 Like

Sorry here, during designing I confused the textbox and label text; I will modify them.

A word about naming things in programs.

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.

1 Like

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.

http://www.appinventor.org/book2

1 Like