CrossRoads:
itoa() worked, tried it one of 7 places where it can be used.
Would ftoa() work similar?
ftoa - C++ Forum
I don't see how you limit it to one or two decimal places tho.
There is no 'ftoa()'.
Try dtostrf(). Here's a simple example of it's use:-
void setup()
{
// dtostrf(val, width, precision, buffer);
Serial.begin(115200);
double dVal = 123.4567;
char buffer[10];
dtostrf(dVal, 5, 2, buffer); // Prints "123.46"
Serial.println(buffer);
dtostrf(dVal, 4, 2, buffer); // Prints "123.46"
Serial.println(buffer);
dtostrf(dVal, 0, 3, buffer); // Prints "123.457"
Serial.println(buffer);
dtostrf(dVal, 6, 2, buffer); // Prints "123.46"
Serial.println(buffer);
dtostrf(dVal, 7, 2, buffer); // Prints " 123.46"
Serial.println(buffer);
dVal=0.12345;
dtostrf(dVal, 0, 2, buffer); // Prints "0.12"
Serial.println(buffer);
}
void loop(){}
Edit:
Why twice? :-
digitalWrite (cs0, LOW);
digitalWrite (cs0, LOW);