Hello
Perhaps you can help me. I am new with Node-Red.
I want to read from my serial (USB) on a Raspberry.
The incoming data are coming from a oiltank level ultrasonic sensor.
The sensor is sending every 60min data. The data are 22byte.
I am only interested in 2 bytes. In my case i need byte 16 and byte 17.
I found that i have to multiply the value of byte 16 and add the value from byte 17.
The result will be my remaining liters beeing in the oiltank.
Actual i found the Serial in node and configured it.
My Debug gives me after a few hours some data:
Raw:
[83,73,0,22,2,16,11,30,27,80,94,82,94,0,0,0,9,217,15,57,70,169,83,73,0,22,2,16,12,2,25,80,94,82,94,0,0,0,9,217,15,57,40,6,83,73,0,22,2,16,12,34,23,80,94,82,94,87,0,56,9,217,15,57,232,232,83,73,0,22,2,16,13,6,20,80,94,82,94,0,0,0,9,217,15,57,67,195,83,73,0,22,2,16,13,38,18,80,94,82,94,88,0,56,9,217,15,57,18,108,83,73,0,22,2,16,14,10]
I guess i need this part:
83,73,0,22,2,16,11,30,27,80,94,82,94,0,0,0,9,217,15,57,70,169
Now the question: How can i split and convert the values and how can i calculate with them?
The result must be 2521.
The flow will be: Serial in --> Function (With some code) ---> Text (UI) with my liters?
What will be in the function?
Thanks a lot!
Best,
Bjoern