Continue to Site

Welcome to

Welcome to our site! is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.



May 30, 2024
Reaction score
Trophy points
Activity points
I need a great help. Hope anyone who is good in embeded systems can answer my question.

My project is titled OBD2_Emulators.
I have two stm32 nodes, each which has one ssd1306 and one CAN trancseiver module.

Except node one, it has a one DS18B20 temperature aside.

Now the first node should emulate OBD2_Vehicle and the second node should emulate the OBD2_Device_Scanner.

In my project I am simply required to send my DS18B20 temperature as an OBD2 ECT PID value format to the second node and receive back on the second node and display it on the ssd1306 OLED.

Now my problem is, how can I do that since the DS18B20 temperature is a float value.

I have asked ChatGpt and it says that I must use a map function to achieve this. Anyone can confirm of this in anyway?

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


LaTeX Commands Quick-Menu:

Part and Inventory Search

Welcome to