I'm not understanding why I'm unable to convert the Liters/Minute to a numberical value.
7.320,4.734,284.057
4.7340 Liters/Minute
0 in HEX
if (sensor_stringcomplete){ //if a string from the Atlas Scientific product has been received in its entirety
Serial.println(sensorstring); //use the hardware serial port to send that data to the PC
for (int i=6; i<11; i++) {
Serial.print(sensorstring[i]); //print each string character to verify
float flowLong = (sensorstring[i] - '0');
}
Serial.print(flowLong);Serial.println(" Liters/Minute");
if (flowLong < 4.5) {
Serial.println("FLOW WARNING!!!");
}
Serial.print(flowLong,HEX);Serial.println(" in HEX");
sensorstring = ""; //clear the string buffer:
sensor_stringcomplete = false; //reset the flag used to tell if we have received a completed string from the Atlas Scientific product
}