May-08-2021, 10:45 PM
I have this continuous serial data stream:
I found solutions using
For example,
---------------------------------------- SENSOR COORDINATE = 0 MEASURED RESISTANCE = 3.70 kOhm ---------------------------------------- ---------------------------------------- SENSOR COORDINATE = 1 MEASURED RESISTANCE = 3.70 kOhm ---------------------------------------- ---------------------------------------- SENSOR COORDINATE = 2 MEASURED RESISTANCE = 3.69 kOhm ----------------------------------------For each iteration, i want to be able to grab the values. The sensor coordinate value, and the resistance value.
I found solutions using
.split()and with regular expressions, but the problem is that in my case, there is not one string that i want to filter, but a continuous stream.
For example,
.split()will find my string, but it will split the stream in half. This does not work, in a continuous stream, for more than one time.