This code is to be part of a system of valves and pressure sensors to manage the water in a smart home. But, since the company I made this for (I made this as a project at school) abandoned the code and remade everything for their needs, I decided to release the old code for anyone and everyone to mess around with.
Im sure you'll have as little problems as possible, as I comment A LOT in my codes.