[UPDATE] I have just added a video of the latest Python to Arduino parser that shows Python controlling an RGB LED on the Arduino with a pretty decent update interval. I have also added two python scripts along with a compatible arduino sketch for anyone who is interested.
Implemented into one of the python scripts now is a stress testing portion for really testing a wide verity of delimiters and format styles while getting to see good visual feedback from the RGB LED.
im having a little trouble extracting some information from a string.
I have attempted to build a few sketches previously but did not like their behavior, so im starting from scratch and hoping someone here might be able to help.
basically i have a few Dri-Air ARID-X10D dryer units, and they have on-board rs232 that i am attempting to read from.
there are multiple ways to extract data from the unit, the simplest is to enable "verbose mode" and every 10 seconds the unit will transmit a CR terminated string (no handshaking involved). the string looks like this:
"97, 97, 97, 91, 91, 91, 82, 81,235, 82, 82, 82, 82, 68, 47,-46 195 192 194 851 0 107 18 0 0 0 0\n"
which to me looks very inconsistent (some values are separated by commas, some by spaces, some by double spaces and some by comma/space). i have no idea what the engineers where thinking, but am fully confident the Arduino platform is up to the challenge. but for a beginner in C++ like me this seems like a nightmare scenario!
initially what i wanted to do was take that string, parse through it and fill an integer array with the values present in that string. for example:
arry = 97 arry = 97 arry = 97 arry = 91 arry = 91 arry = 91 arry = 82 arry = 81 arry = 235 and so on..
but i am unaware as to the existence of any libraries available that can do this directly (i suppose something similar to regular expressions would suffice), or if there are functions that i might not be aware of that would make this operations a little easier?
Thank you all so much for any advice!!!