void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
Serial.println("Test Ser Out");
String test = String(5.02131234, 4);
Serial.println(test);
}
void loop() {
// put your main code here, to run repeatedly:
}
However, I do need to fix it, are there any precompiled mbed os files that can be used in place of the default one, or is there a detailed explanation how to resolve this using a windows (not linux) system.
I would rather avoid having to use a custom ftoa subroutine to do this.
Unfortunately as well, the project is very time limited, and this needs to be resolved over the next 24-48h.
There has not been an updated pre-compiled boards library.
You can use the same steps as I posted there on 7 april.
Unzip and make the 2 changes in HardwareSerial.cpp in the directory location: \AppData\Local\Arduino15\packages\Sparkfun\hardware\apollo3\2.2.1\cores\arduino\mbed-bridge\core-implement
you are right. The approach in the post is only changing/correcting a “serial.printf()”, not a sprintf(). need to take a bit more time to look into that.
I used an ftoa function off the net for now (while hopefully a variant mbed OS is compiled with the full printf enabled). However, your suggestion would have made a good temporary replacement as well.