I want to do communication node-red (raspbery 3+) with arudino using rs485 protocol and have some questions.
I can send and receive messages through the serial port node. It is very easy with node-red.
But I want to slightly modify my "protocol" and want to make response of receipt and sending of data. But I dont understand how.
For example, I send data to several arduinos and set the send flag to 1 (Flow context) using the Set node. Then I receive a response from the arduino like "1OK", "2OK"... etc., where the first char is the ID of the arduino, "OK" - response of data receipt. I need:
- Check if 2 and 3 char to equal "OK";
- If it equal, then check what the first character is;
- Set the corresponding ID flag equal to 1.
How to do it? I think about function, but it little hard for me.
Can I do this without using functions? With standard nodes?