Hi,
for me personally the post is hard to comprehend. There are a lot of abbreviations one needs to look up.
--> Next time please add a short description and add links to datasheet
Like: OBD2 = car diagnosis via CAN bus
Instead of writing long, hard to read texts .... it's way better to (hand) draw a sketch.
Correct me if I'm wrong: STM32 (even in headline) is the microcontroller family you use. It has nothing to with your problem at all. (You had the same problem if you were using a PIC microcontroller)
****
--> so when focussing on your real problem it is like this:
Sensor_data (DS18B2) --> CAN bus message (can_format) --> display (SSD1306 controller).
If so: Tell us what's the exact problem?
* you don't know the DS18B2 data format? (You say it is float, but it isn't. Did you read the datasheet?)
* you want to know the can_format?
* you want to know how to translate DS18B2_format to can_format?
.... and so on
Please focus on the very problem and tell us what you need to know.
***
--> if it's a coding problem: show what you have done so far, your IDE, code language, used libraries....
Also tell us your test conditions, what you expect and what is not like expected
Klaus