I have a multiple sensors which I am reading using an arduino micro, sensor data is a mix of floats I.e temperature 10.5. I will read all the sensor data from another board using the spi.
I am going around in circles on converting the float to an spi char buffer. I am using dtostr to convert the float to a string, but then just cannot work out the conversion to spi char which will need to be ASCII characters.
So if the temperature is 23.55 the spi buffer will be
Spi_buf[0] = 0x50; // ASCII 2
Spi_buf[1] = 0x51; // ASCII 3
Spi_buf[2] = 0x46; // ASCII .
Spi_buf[3] = 0x53; // ASCII 5
Spi_buf[4] = 0x53; // ASCII 5
So on the SPI transfer I will end up with this string on master device.