i want to interface a sensor to aurdino to monitor wheather water is flowing or not through a pipe and need to execute certain commands if so.
A non-contact water sensor or flow sensor ?
For example this one : Non-contact_Liquid_Level_Switch_SKU_FIT0212-DFRobot
There are more, some are expensive industrial sensors.
inline flow sensor?
What is the pipe carrying? Drinking water? heating? Clean?
This sensor from adafruit might be what you want:
You might find a cheaper solution (If you don't need precise reading on amount of flow) here:
You could also glue foam (or any material less dense than water) to a magnet and use a hall effect sensor to measure how high the magnet is floating above the pipe (very cheap)(http://www.jameco.com/webapp/wcs/stores/servlet/ProductDisplay?storeId=10001&productId=1915835&catalogId=10001&langId=-1&CID=GOOG&gclid=CjwKEAjw6_q5BRCOp-Hj-IfHwncSJABMtDaieU5-u4eAnd-FY5EqTPqX60I500u6jDfvns5HOloQzRoCYNPw_wcB)