I am attaching my code (which works in a basic sense) with a block image that is obviously the wrong way to do things. I am trying to enter a maximum and minimum temperature and humidity in the calculator section and have the alarms (spoken text) sound when conditions are exceeded. The block image I attached seems to me like where I should be testing but I get errors when running.
Might someone suggest where to place my four if statements for testing? As I think I have tried everywhere with no success, this might be the wrong approach.
If there is anything else I am missing in order to help you help me, please advise. I think I am, once again, over thinking this. Thank you for reading.
If you are going to initialize these 4 limit values to empty text, you would need to add extra code to the incoming data checks to skip the limit tests if the limits are not numbers.
The numeric compare blocks do not suffer non-numeric inputs lightly.
I am sorry I am so dense but I just do not see in my code what you are saying regarding upper case characteristics and "upshifted." I did, however, come closer to success. Please review my general response to myself at your convenience and, perhaps, render a suggestion or two?
OK, I moved the if/than's into a 10-second clock and set the BLE transmission rate of my Arduino to 2000ms giving me 2-second updates and 10-second reports. The only solution I am now seeking (my brain is fried) is how to broadcast all of the true if/than's sequentually, not at the same time as is now happening. What IS now happening (IMHO) is that the temperature alarms sound but the humidity alarms overwrite them as the humidity if/than is hot on the heels of the temperature if/than. I need a way to tell the system to wait on reporting the humidity data until the temperarure data is reported.
Greetings and thank you so much for your response. I am being exceptionally dense, as I do not understand the highlighted block sequence you sent to me. Regarding error messages, I finally got the issue solved (ABG suggested using IsNumber?) commands and I am down to trying to prevent a second spoken alarm from overwriting a first spoken alarm before it even gets started. I will insert my clock2 block that makes the reports every ten seconds (with overwriting),
I have been working hard at grocking lists. I didn't know until this morning that lists were dynamic, in that removing index 1 now shifts everything such that what was index 2 is now index 1. Somewhere, I seem to be telling the system that my list is only 1 item long when it could contain up to 4 items.
Given this, I thought I had this issue wrapped but I received the following error message:
I am now running in circles but I believe I am close and the fix is simple. If someone sees the erro of my ways, please be so kind as to point it out and correct me. Thank you so much!
Text comparison of two multi-digit numbers is risky, if the number of digits changes or one of them goes negative or zero. To deal with that, check in the first branch of the AND if the limit is a number (not blank too), and save the second AND clause for a good old fashioned numeric (blue) >= test.
Use the ADD ITEM to List block instead of assuming reserved seating. Lists expand and contract with the number of items in them, like a chain expands and contracts as you add or remove links from the chain.
This is how you should test if a list is empty (0 items) or not:
Trying to select any item number from a list that has not been checked for emptiness is doomed to fail.
I did some housekeeping and reinovation to my code but I still have an error that I do not grock. I will list the three previous *revised" blocks and my error in hope this elicits a knowledge response in you and a solution when you are finished ROTFL.
I call the second block my problem button because, when I click on it, I get my error. I thought the "Not" + "IsListEmpty" in the if/then would prevent this from happening.
Hi, again, @Taifun and @ABG. Interesting. This is the first time I have successfully connected my AI2 browser to the companion. I went through the motions and, when all was said and done, the do it system returned the error message I previously posted. Clicking the ATMO1.Click is still the problem. It says I am trying to test from a list of 1 when the list is empty but I thought the "not" + "IsListEmpty" would prevent this from happening. IMHO, NotIsListEmpty should stop the system from seeing a list item of index 1 until index 1 actually exists. This is not happening. I feel as though I am very close, but still unable to make this code work as I expect it to. ATMO1.Click still brings up this error: