The depth sensor was calibrated using pvc tubes of different lengths. The tubes were sealed at one end and filled with water, the depth sensor was then submerged at the the open end and left for one minute. The count recorded by the Arduino was average over one minute. The Arduino count was then plotted against the length of tubing to give an expression that can be used to find the depth from the Arduino count. For this MB7078 depth sensor, the depth of water = 6.94 x Arduino count + 1.6.