Got it working but the data is coming in very fast and i'm worried about an overflow condition.
I'm getting this.
{"payload":14.331297874450684,"_msgid":"d5bffa5.f807e08","error":"TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type number"}
[
{
"id": "64790db0.313854",
"type": "serial in",
"z": "ff00b690.4e7c68",
"name": "Pressure Sensor",
"serial": "6bd65ea6.e09bb",
"x": 100,
"y": 340,
"wires": [
[
"2bce8846.82789"
]
]
},
{
"id": "2bce8846.82789",
"type": "function",
"z": "ff00b690.4e7c68",
"name": "IEEE-754 to float",
"func": "var buf = Buffer.from(msg.payload);\nmsg.payload = buf.readFloatLE(2);\nreturn msg",
"outputs": 1,
"noerr": 0,
"x": 340,
"y": 340,
"wires": [
[
"131dfaf1.bdb325"
]
]
},
{
"id": "d5ec99bf.39811",
"type": "debug",
"z": "ff00b690.4e7c68",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"x": 720,
"y": 340,
"wires": []
},
{
"id": "131dfaf1.bdb325",
"type": "change",
"z": "ff00b690.4e7c68",
"name": "",
"rules": [
{
"t": "delete",
"p": "port",
"pt": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 560,
"y": 340,
"wires": [
[
"d5ec99bf.39811"
]
]
},
{
"id": "6bd65ea6.e09bb",
"type": "serial-port",
"z": "",
"serialport": "/dev/ttyUSB0",
"serialbaud": "115200",
"databits": "8",
"parity": "none",
"stopbits": "1",
"waitfor": "0xAA",
"dtr": "none",
"rts": "none",
"cts": "none",
"dsr": "none",
"newline": "6",
"bin": "bin",
"out": "count",
"addchar": "",
"responsetimeout": "10000"
}
]