we used ultrasonic sensor to detect the level of water in the tank if the level of water is low then the sensor sends signal to the motor and water is pumped automaically to the tank if the water level is full the sensor sends signal to the motor and its switched off automaticall
============HOW TO SETUP THE CONNECTION=========
HC-SR04 ==== NODEMCU
Gnd__________ Gnd
Vcc____________ 3v
Trig___________ D4
Echo____________ D3