A rain sensor is a practical module that measures rainfall or liquid contact by detecting water drops falling on the sensor surface. It usually comes with an LM393 comparator board, which provides both a digital (D0) output, whose threshold can be adjusted with a potentiometer, and an analog (A0) output, which proportionally indicates the intensity of the rain. This sensor is fully compatible with Arduino and ESP boards and is widely used in smart home automatic closing window and awning systems, agricultural irrigation automation and mini weather station projects.