- Thu Jul 08, 2021 9:16 am
#227106
See my original post for reference. https://forum.arduino.cc/t/string-print ... ple/880775
I still have not been able to solve this (using arduino IDE 1.8.12 and sparkfun apollo 3 boards version 2.1.1) . The file i am testing it on is under file->examples-> strings-> string constructors
I tried modifying compiler flags, which did not work. I tried using dtostrf with the following code
#include "api/deprecated-avr-comp/avr/dtostrf.h"
float f = 3.14159;
char floatString[10];
dtostrf(f,4,2,floatString);
char derpy[50];
sprintf(derpy, "myFloat in string is = %s\n", floatString);
Serial.println(derpy);
Which still printed out myFloat in string is = %4.2f
I tried using the PrintEx Library v1.2, however that does not work i get a huge compilation error out of the box with the default example Printex-> basic usage in the attached file.
I am at a loss of ideas I need to print floats to a terminal as well as put a float to a character array with this board to send over the lora radio with the function?
radio.transmit((const char*) &txPacket[0]);
I still have not been able to solve this (using arduino IDE 1.8.12 and sparkfun apollo 3 boards version 2.1.1) . The file i am testing it on is under file->examples-> strings-> string constructors
I tried modifying compiler flags, which did not work. I tried using dtostrf with the following code
#include "api/deprecated-avr-comp/avr/dtostrf.h"
float f = 3.14159;
char floatString[10];
dtostrf(f,4,2,floatString);
char derpy[50];
sprintf(derpy, "myFloat in string is = %s\n", floatString);
Serial.println(derpy);
Which still printed out myFloat in string is = %4.2f
I tried using the PrintEx Library v1.2, however that does not work i get a huge compilation error out of the box with the default example Printex-> basic usage in the attached file.
I am at a loss of ideas I need to print floats to a terminal as well as put a float to a character array with this board to send over the lora radio with the function?
radio.transmit((const char*) &txPacket[0]);
You do not have the required permissions to view the files attached to this post.