This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to print multiple float values in a raw

Hi everyone,

I want to serial print three float values (x,y,z) from an IMU. I use the MACRO NRF_LOG_ERROR( "Float_Value:  " NRF_LOG_FLOAT_MARKER "\r\n", NRF_LOG_FLOAT(value));

When I print two values it works fine 

NRF_LOG_INFO("ACC X: " NRF_LOG_FLOAT_MARKER " , " "Y: " NRF_LOG_FLOAT_MARKER "\r", NRF_LOG_FLOAT(accRawData.x),NRF_LOG_FLOAT(accRawData.y)); 

But when I try to print three values it returns an error

NRF_LOG_INFO("ACC X: " NRF_LOG_FLOAT_MARKER " , " "Y: " NRF_LOG_FLOAT_MARKER " , " "Z: " NRF_LOG_FLOAT_MARKER "\r", NRF_LOG_FLOAT(accRawData.x),NRF_LOG_FLOAT(accRawData.y),NRF_LOG_FLOAT(accRawData.z));

maybe this MACRO cannot print more than two floats?

Is there any way of printing all three values in a row?

Thanks in advance

Nick

Parents Reply Children
Related