Hello!
I am trying to receive three separate numbers from the serial port and then convert all of them into their own respective float variables so they can be mathematically manipulated separately.
This is what I have so far:
char input, lower, upper;
//void setup() code
void loop()
{
if ( Serial.available()) //Checks the availability of Serial port
{
input = Serial.read(); // Read the data and stores it in variable
lower = Serial.read();
upper = Serial.read();
}
float input;
float lower;
float upper;
//Rest of the code follows
}
However, I fear that I just write over the variable each time, so that input, lower and upper are all just the last entered variable.
Some direction and help would be much appreciated!
Thank you!