Dtostrf && Sprintf with Arduino 101

Dear community, I was working with a code in which I need a google maps link, created from the latitude and longitude that I obtained with a GPS. Since the values were floats, I had to convert these and create manually a String with the google maps link, I used this commands:

float latitude = 45.202021; float longitude = 8.656595; char latBuffer[10]; char longBuffer[10]; char link[60];

dtostrf(latitude, 0, 8, latBuffer); dtostrf(longitude, 0, 8, longBuffer); sprintf_P(link, PSTR("www.google.it/maps/place/%s,%s"), latBuffer, longBuffer);

It works perfectlly with my arduino micro, but now with the Arduino 101 the Serial port shows me a lot of strange characters and blank spaces which makes the googe map link incoherent.

Anybody knows some alternative or how to get this link properly? (I get the values of latitude and longitude as a floats)

Thanks for your time

Hi, you can work around the issue by replacing the stdlib_noniso.cpp implementation of dtostrf to

char *dtostrf (double val, signed char width, unsigned char prec, char *sout) {
   char fmt[20];
   sprintf(fmt, "%%%d.%df", width, prec);
   sprintf(sout, fmt, val);
   return sout;

I'll open a pull request to Intel repo to handle this case, thanks for reporting!