ESP32 read from MAX485

I just new to RS485 protocol so I dont have any idea how to make ESP32 read data from MAX485 that connected to electromagnetic flow meter device using 485A and 485B port. the flow meter datasheet told that the output is 4-20mA. Please someone englighten me

Have a search for ESP32 NPK in these forums. The NPK sensor isn't the same as yours but the methodology is the same.

Then you connect it to an analog input, together with a resistor to convert the current into voltage.

More assistance will be possible if you give a link to the datasheet of your flow meter.

1 Like

I confuse why total printout 137171 ??

if we calculate the total (node.getResponseBuffer(1) * 65536 + node.getResponseBuffer(0)) should it be 1312830 ??

also here is my flow meter user manual:

I moved your topic to a more appropriate forum category @atron9.

The Nano ESP32 category you chose is only used for discussions directly related to the Arduino Nano ESP32 board.

In the future, please take the time to pick the forum category that best suits the subject of your question. There is an "About the _____ category" topic at the top of each category that explains its purpose.

Thanks in advance for your cooperation.

1 Like

Maybe try :

(node.getResponseBuffer(1) * 65536UL + node.getResponseBuffer(0))

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.