This project I downloaded from the MIT App Community, and they said to use it to make a gauge the same as they did, but in their project the gauge heading is not in the middle when rotating.
You would test
IF and((is a number(ntype)) , (ntype > 0)) then
...
You never apply an if/then test to a number or a text. They are not logical true/false values, which can only be gotten from applying comparison tests.
Please for this question. Please, I have another question: how can I adjust the clock timer to catch the baseline resistance in air and also with gas resistance?
I will add an input of response and recovery time, and they will be the same time. For example, I need to get resistance every 60 seconds, or input time, which I can add in the app itself. I am using this app for my PhD work.
My app will be for gas sensing that can take the data from the ESP32 as voltage and convert it to resistance using a Wheatstone bridge. After that, convert the resistance to a sensor response using R/Rbaseline. What I also have to set is the response and recovery time in the app to calculate the R baseline and R for gas; then it can convert the detected sensor response to ppm using the calibration screen from the slope itself. Also, I need to make three layers for alarming green, yellow, and red by something like a gauge shown on the screen and also send an alarm to the user. Belalv4.aia (1.9 MB)
Here's a sample app that calculates response time from the input stream.
(The test run has a negative time, before I switched the before and after readings in the blocks.)
I will await a specific question about a specific piece of code.
I leave it to you to read your own code and any other code you may have dragged into your project. You should understand every block and screen of your project.
Here are some inconsistencies I see in your code:
Setting a paint color but not drawing anything
Testing if bytes are available from Bl;uetooth but not trying to receive anything from BlueTooth.
Setting a Web URL to something but not issuing a Web call (Get/Put) or adding an event to receive a web response.
Also, it is time you renamed all your procedures to describe their functions.
The blocks editor has in the past destroyed procedures that have been left in their default names for too long.
By the way, the AI2 Data Science Designer folder has a component with a block to do linear regression.
Good luck with your extension.
I don't support extensions.
Thank you so much
Actually I will work on my code to link the functions together and also recieving data by Bluetooth and converting Voltage to resistance then to response and concentration in ppm, then degrees to rotate the arrow.
So tomorrow I will send my project to check
Thanks
When you have no experience with connecting AI2 to a Bluetooth device, it is helpful to get a Bluetooth terminal app from the Play Store to see the data coming from the device, independent of your AI2 app.
Thanks
How can I utilize the resistance baseline project to read real-time data? It can then compute it and send me the voltage. Also, I want to know if I can get resistance directly from the Arduino.
...
This code assumes the resistances are send from the Arduino using the println(resistance) command, which converts the resistance to text and ends it with the mandatory \n character.
Instead of feeding the incoming message to a Label, capture the current Clock1.SystemTime and feed the time and message into the graph and readings list of the aforementioned graph project.
I have no idea how your Arduino setup works.
You would need to post the wiring diagram and the code, and hope for one of our hardware fans to chime in.
The Clock timer should log the message, not my test slider thumb.
I included the slider in my sample app to simulate input.
Delete the slider component, and use the global message variable value instead to feed the graph and the logging.