But it shows “%f” instead of the float values. How can I make it 1. work and maybe 2. less convoluted? How is it meant to be done? This is something I’ll be very frequently doing in my projects.
you can try the std::string_view. It works well with BufferedSerial or UnBufferedSerial.
std::string message= message = string1+ to_string(float1) + string2 + to_string(float2) + “\n”;
std::string_view buff(message);
blutooth.write(buff.begin(), buff.size());