Attempt to get item number 2 of a list of length 1: (*empty-string*)<br/><i>Note:</i>
Hello
I am a beginner and it’s my first post. Coding on Arduino I discovered App Inventor 3 weeks ago. I tried quite a few tutorials and made a couple of basic apps. Thanks to this forum.
However, right now I am mired for 5 whole long days with an app.
First I made an app for getting time from Arduino’s RTC so has to reset RTC’s time and date from Android. Very basic and it’s working seamlessly.
Then I made an app for getting GPS longitude, latitude and altitude from Android and send them to Arduino. Seamlessly working too.
And I decided to combine both apps in one (name: tabsMINIMA), using the brilliant TABS TABS app from Cyd Carp. And no way to have it work, even though it’s just merging to 2.
MY TROUBLE IS that whatever string I sent the app, it is declaring « empty string » ?
« Select list item: Attempt to get item number 2 of a list of length 1: (*empty-string*)<br/><i>Note:</i> You will not see another error reported for 5 seconds. »
My Arduino string is to be cut into strings using ", "(comma) delimiters.
For testing inventor reception I am using either;
hc06.println ("index1,index2,index3,index4,index5,"); or shorter as the app reads most of the time 3 strings ; hc06.println ("index1,index2,index3 ") ;
My first label in the app displays the whole string sent by Arduino, and it seems ever OK. Then, 3 other labels for respectively index 1, index 2 and index 3. Almost never any display for index 1. Display for index 2 and 3 is very erratic.
Regards to Arduino receiving data from Android, most of the time, any string is missing the last third substring or this one is gibberish.
Notice that when the app is disconnected, it’s tough to connect it again.
Why on earth copy cat of 2 distinct apps are useless when merged? I should miss something but for 5 whole days (and part of nights) I tried every possible trick no way. No pieces of information found on the web. I am out of imagination and turning insomniac and mad. If You can have a look and be indulgent, thanks a lot.
Kind regards JB