float pi=3.141592;
char pi_str[5];
char serialMsgBuf[128];
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
dtostrf(pi,4,2,pi_str);
sprintf(serialMsgBuf, "pi_str: %s", pi_str);
Serial.println(serialMsgBuf);
delay(100);
}