The idea of the program is receive a command via wireless, after receive the command, arduino turn on the valve and send via wireless the flow sensor data. When arduino receives the command to turn off, it turn off the valve an stop to send flow sensor data. At the first time it works well, but if you try to do it again, I mean, try to turn on again the valve via wireless command, it seems like arduino doesn't receive anything.