Float formatting in the Sodaq ONE

Hi!

What’s the best way to get printf-like float formatting in the Sodaq ONE?

I tried a number of libraries and solutions, but couldn’t get anything to work and I’ve spent almost all my day into this. I tried PrintEx (I just opened a post, as I can’t compile it), I tried a number of other libraries and hacks during the day (like adding a template to get streaming working, but it didn’t either), using dtostrf() (didn’t work either)…

I’m at my wit’s end, and I’m sure that by now, somebody might have figured it out. I’m tired, and I don’t know where else to look.

I’m using the latest IDE, and using a Sodaq ONE. Any help would be so MUCH appreciated!

Hi,

SerialUSB.print();

http://support.sodaq.com/sodaq-one/one-hardware-serials/
https://www.arduino.cc/en/Serial/Print

Regards,
Jan

Hi,

I don’t understand your answer. I know that I can print floats with SerialUSB.print(), but that has only a limited formatting capacity (just precision). I was looking for something in the lines of sprintf and the like. Or do you just mean that that’s it, there is no better way?

This is a known issue on the SAMD platform.

It is discussed here: https://forum.arduino.cc/index.php?topic=349764.0