A WiFi-Based Sensor Network for Flood Irrigation Control in Agriculture