Serial Input to Function

Hey Everyone, I have a flow which reads serial input from a balance to a RaspberryPi. The serial flow then parses the information every second into an integer and delivers the weight as msg.payload to a function node in a separate flow to operate a metering pump if the scale weight < target weight. The data is constantly feeding the debug on deployment of the flow, but I was wondering if the balance weight could be triggered on/off by a UI button, where the scale data doesn't deliver a payload unless the button is selected? New to Node-Red and JavaScript. Any help with this is greatly appreciated.

You could try having the ui-button control a gate node

1 Like

That works. Thank you for the help!

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