Another thing that is missing from the code is setting flow rates to zero, if an input loses the signal for some reason. As it is now, the value stays whatever the last measured value was. This means that is an input signal is lost, it will continually log the last measured value. Any ideas on how to do this? I'm currently experimenting with an if statement:
if ((inputsState == LOW) && inputsPrevious == LOW)){
_ flowRate == 0}_
So far I'm not seeing any success, though...