[SOLVED] Sloeber and float sprintf: doesn’t work
I’m trying ti make sprintf work in Sloeber with float.
I wrote the following sketch to test it:
#include "Arduino.h"
void setup()
{
Serial.begin(115200);
delay(5000);
}
void loop()
{
static float temp = 10000;
uint8_t i;
char buffer[100];
for (i=1;i<13;i++) {
Serial.print("Before ");
Serial.println(i);
//sprintf (buffer,"Value = %f",temp);
ftoa(temp, buffer);
Serial.print("After ");
temp=temp/3;
Serial.println(buffer);
}
while(1);
}