Water Sensor Help

Hello all. I need some assistance with my code for a project involving a water sensor. The sensor is supposed to send a signal that is read every 5 seconds. Once it reads that signal above a threshold, it activates a light. However, in testing my code, for some reason, once the signal gets above that threshold, the code stops reading for a signal. Does anyone know how to fix this and make it keep reading for that signal? Attached is the file for my code. Thank you.

Water_Alarm.ino (636 Bytes)

Can you say this in other words: "Once it reads that signal above a threshold..." ?
For example: "If the signal is above a threshold...".
Then look at your code, you see a "while". That means that if the sensor value is above 200, it stays forever in the while-statement. Change the "while" to a "if".

Changed and it works like a charm. Thank you.