Yep, much more so now than before. Thank you so much for your response. Today, I learned that the last number on a scan of BLE addresses is signal strength. I wonder what tomorrow will bring?
If I may ask for a little more guidance, would you please look at these blocks? One seeks out all available BLE signals and the other allows me to connect to the address I clicked onto in my list. I believe you are speaking of using these blocks in a way I have not yet done and I am a little lost.
Would you please look at these three blocks and suggest what I might use to extract the name from the hex address and signal? If you could refer me to an example ofsorts, I am pretty good on internalizing once I understand.
As they are separated by spaces, try the split at spaces block from the text drawer to get a list with 3 items, then select the first item to get the name
You are already familiar with working with lists, aren't you?
Hi, I sort of follow what you are saying but I am lost at this part:
If the select 2nd item = your desired device name
How do I throw away the first item (the MAC address) and "select" the second item to compare to my name? I am fine with the if/than/else but lost as to how to address or select the second part once divided.
Imagine you have stored your name either in glob variable name or a text field.
For each item in the global list of BLE
If select list item list{ split text at space get item} index {2}= get global device name
Then //do blocks for true
Else //do block for false.
If you want the device name after list picking
Then
After listview picking
If select list item list {split text at space {get listview selection } index {2}} = global name
Then //do blocks for true
Else //do blocks for false
Thank you for all of the information - I will be reading! I know I am making this harder on myself than it really is (fear of the unknown?). I just grocked the term "index" and how it applies to the position of an item in a list. Baby steps, again . . .
Thank you so much for that example. I just cracked open the MIT AI2 tutorial on lists but, without your example, I would have had no idea that the "index" referred to the position of an item in a list. I am working with your example and information that ABG sent, as well. Spicy_Topics tried to educate me but assumed I understood the importance of the word "index." As an educator, I sometimes hate the way my mind works when trying to embrace new knowledge.
Thank you, it is all clear now. I just needed additional hammering to crack open my mind to learn the term "index" and how it applies to items in a list.
Glad to help you. Also as per @ABG you can read FAQ to learn more about each component of mit so you will come to an conclusion, what type of blocks need to use for the logic
I am really trying to follow your block example without extensive reading and comprehending. I am posting a png of what I think my connect block should look like. Referencing the notes in the png, I wanted to plug in the "ListView1.SelectionIndex" but the "select list item list" will have none of it.
As the error changes if I ignore it and restart it, I get that the system is pulling in whatever is showing as the global name at that instance, so this is obviously the wrong logic.
If you have a moment, would you please look at the attached block structure and error message? I don't know if that is enough to deduce where my ignorance lies, but this is where I generate my errors. Thank you for everything, to date. I seem to take awhile to grock a new code issue sometimes, but with some community assistance, I soon own another tool in my programming ability.
You should get the listview selection and split at space then only this part will turn into an argument into a list after then only you can use select kist item list
Since ListView1.SelectionIndex is the selected item from my listpicker, why do I get errors when trying to extract the elements from the second index? This seems so logical but fails. The errors are inconsistent, but here are three:
Thee errors come up differently everytime I clear out my app data in the phone and reconnect.
Just for gits and shiggles, could I send a UUID named "name" that would have a unique number? I could test for that number with an if/than to determine my next course of action. This seems much simpler than trying to disassemble a BLE string without experience.
I am so very grateful for everything that has been shared with me. Everything is working perfectly and I have gained new insights and understanding. When I changed the BLE_NAME from "ATMO" to "Psychrometer" in my Arduino sketch, I noticed that the background screen displayed what I expected (hoped for?) but both had error messages that referenced "The Operation <= cannot accept the argument ["Air Quality Index"], [50]." So, I went looking for that statement and it turns out that it was an incorrect statement that passed through without an error (up to now) and should have read "VOC_BLE," not "Air Quality Index." The temperature and pressure errors were red herrings introduced by the above mentioned mistake. I thank you for your input and guidance. Sometimes, it takes a village to help me shake-off a learned sense of self-disenfranchisement. All the reading in the world would not have allowed me to infer what was shown to me here and I greatly appreciate all of the contributions!
How about comedies of code with robust errors? At least I can now enjoy a baked potato with sour cream and chides;). No, seriosly, though, what's in a name? The truth is, I totally understand logic and can wrap myself around C++ but there are just so many neuanced selections that can be applied herein the block drawers. I was basically throwing code onto the wall to see what would stick. As usual, the solution was simple and elegant and something I had never seen before. Every time I go through one of my freakout "Ermahgerd - How Do I Do THIS" meltdowns, one or more of you take my hand and lead me off the ledge, allowing my challenge to become another knowledge tool that benefits me in the future.