This sketch defines two variables: lowerThreshold and upperThreshold. These variables stand for our thresholds. An alternate approach for continual optical level sensing will involve using a laser. Laser light is more concentrated and thus is more capable of penetrating dusty or steamy environments. Laser light will mirror off most good, https://controltechme.com/ultrasonic-level-sensor/