Actually, tomorrow I will check the real time sensing by testing the sensor toward gases as I need to check the gauge and analyze code of Rgas and R air for baseline, so I will need your help, thank you so much, without your help I couldn't do it
Hello @ABG
Please, the app still has a small error, which is that the timer is still working even after I press reset or even stop. Therefore, please tell me how I can stop the timer and reset it. Also, when the BLE is connected, it is directly enabling the clock timer; however, I set the timer to false.
Gas_sensing_Resistance_Project_Final_copy.aia (340.9 KB)
Try to set TimerEnabled to false
If you are asking for help, I recommend you to make it as easy for others to be able to help you ...
You probably will get more feedback then...
which means in your case post a screenshot of your relevant blocks...
To download the aia file, upload it to App Inventor, open it, do some bug hunting for you, etc... this takes time, and most people will not do that...
Thank you.
Taifun
Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by
Taifun.
Thanks I solved it, the issue was the source

I am guessing local variable rising_readings was an empty list.
So protect the marked block with a list length test.

I did that, but it is not working, as till now the logic is reading the minimum as zero. Instead of that, can I get the resistance at 30 seconds, for example? And also, how can I filter the data, as the data have noise?
What does the wave form look like?
The resistance is calculated from voltage and plot it versus time and the plot looks like rising graph the same as the baseline resistance app you shared before. The minimum resistance is working on your app with using slider but for my app is not working. However, I used the same code blocks.
I see 5 rising sections in your sample.
How do you know which to use?
Yes the rising I will solve but the problem here is that it cannot calculate the minimum resistance. However, I can get the max resistance.
Also, for one rising section, it still has problem
The R0 calculation gives you the minimum value of the list of (time, resistance) pairs.
In your sample graph, it's lower than the starting resistance.
Isn't that what you want?
Yes the R0 is the starting resistance so I need to get it to calculate the response
That's easy.
It's item 1 of your readings list.
Like this I have to do
Or do you have any suggestions?
No need to use minimum list, yes?
I can get the value at any internal index and it is working
Let me ask one additional question: if I need to get the resistance value from the time, not by index. For example I need to set the time at 30 seconds and I need the resistance at this time value.
Thanks
I did it and it is working, but it is written that the length of the list is large if it is more than 5
Show the error message in its entirety.
Your use of a temperature as an index into a list in the R0 calculation can't be right.
If you need the resistance at 30 seconds you would need to loop through the readings until you encounter one that's at or past 30 seconds, and grab it.
Break out of the loop.
If you fall off the end of the list, you don't have enough readings.






