I’m sending, with USB trough serial, data from an arduino to my computer where I have node-red running.
I can see the entire messages coming in the debug and with all the data to be directed to a file where they are recorded. This works good.
But I’d like to extract some of the data to be redirected to a node-red_dashboard graph in real time. And I have no idea how to extract the valuable part of the incoming message (msg.payload) to do what I want.
I can notice, from what I send from the arduino, each “\n” makes a new message to node-red.
Each messages from my arduino are like pair value with the “name of the variable” = x separated with “\t” , like so !
variable_1 = x \t variable_22 = y \t variable_3 = z
I guess, I can add some special character to “highlight” my valuable data and extract it !
Or maybe I could get the second or third data by counting ?
Which would be the best or at least a good practice to do ?
In case it’s not obvious, I’m a beginner !
Any advices ?