I've been doing my homework, reviewing the BLE extension docs at
(The link to newer info seems only to point to a microbit course.)
There is no mention of message delimiter byte values, other than an option to use NULL as a message delimiter for strings being sent from AI2. (NULL is hex 0, which I have yet to find a meta character for, like \n or \r.)
Using \n at the end of an incoming message seems to be folklore, until I can find a reference.
I was also unable to find any mention of commas as having any significance to the BLE data stream.
Unfortunately, I have yet to see a sample sketch where it is used to trigger any data stream side effects.
If I had BLE hardware, I would test to see if the inclusion of commas in an incoming string data stream affect the length of the incoming stringValues list as measured by the AI2 Length of List block.
That's perfectly fine but it is good practice to request them via the App so that nothing gets overlooked and it is helpful for the people trying to help too, as we need to see everything that could have an effect on the data transmission. Speaking of which, is your microchip hardware hooked up to a monitor for debugging? Does it have exactly the right power supply? https://www.professorcad.co.uk/appinventortips#BluetoothFailure
Well the Block is making an App Inventor List, and App Inventor Lists use a comma as the value delimiter...... it could not be a List without a delimiter. The pop-up hint refers to "Make A List" as an example, so I think that really confirms it.
Edit: It could be a List of one value without a delimiter.
Chris and ABG... thanks for your help.... it is appreciated.
The sprintf approach worked. Hopefully this forum stream will help others as they work with BLE and a "non-arduino" microcontroller. I will be working on a slider and passing data from the APP back to the Microchip micro next.
.... and tidy up your components with a proper naming convention so that your code will always be easy to understand in the future. Also delete the redundant components and Blocks. https://www.professorcad.co.uk/appinventortips#TipsGui
Early this morning, I went back to the base project that ABG provided... changed the data separator from"|" to "'," ... so I didn't use the "or better"
I then implemented the sprintf and the data ended up in the labels... I have since expanded the APP to accept more values from the PIC and placed them into the new labels.
I did my homework before jumping on this forum... there is nothing else out there to deal with this combination of issues, and it should prove helpful to others...
Thanks again ...
Well, I think you should use my "or better" example because even your latest version is vulnerable to glitches and faults. You should always test the length of a List before trying to access it's content, not after. Also 'stringValues' is already a comma separated App Inventor List, so there is no need to split it into another comma separated List.