Hi Chrisir,
And thnaks for het reply.
the
if (inString.length() < 62) {
is there because sometimes initially the input buffer has to many characters, actual correct data plus some previous data which i don’t want so this simply ignores any strings that are to long.
Yes i have done println(inString) and the result is:
20.88,21.19,20.06,19.94,20.31,19.69,19.56,20.69,20.56,21.25
which as you can see is comma delimited.
I have made a few small changes including creating random input strings for inString to simulate the strings coming from the ESP8266 uC and this works fine.
What seems to be happening is that if the string comes from the ESP8266 it is not being recognized correctly so the split() function doesn’t work leaving snsrTempList empty so any call to
snsrTempList[i]
fails. But i don’t know why this is happening. Is some type of character conversion required before attempting to read from inString. Although println(inString) seems to read it OK and simulated string data is also processed correctly.
Do i need to import the arduino library to be able to read it the incoming characters properly?
Any help with this is much appreciated.
Cheers.