Multiple gpio with function

I have a newbe question.

I'm setting up a dashboard to monitor liquid in tanks. I will use 4 sensors to a digital pin on an Arduino then to rpi. In node-red after receiving the gpio If it's high I change it to .20, so I ether a 0(low) or .20(high) from each gpio after the changes. Here is where I stuck. How do I add the 4 gpio in the function node and get a total msg.payload?

Have a look at this post from the cookbook for how to combine data from different streams

I looked at the join and that's not what I need to do with the data. Here is a scenario I'm trying to do. Lets say two of the sensors on the tank are high and each one has been changed to .2 I need to add (.4 = .2 + .2) and enter the .4 into a dashboard gauge. I'm just sure how this done in the function node.

Did using the join node solve the first part of the problem, which is to get both values in one message?

Edit: Once you have both the numbers available then the rest is easy.

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