Water Level Indicator using Arduino, RGB LED and Buzzer | Arduino Project

Поділитися
Вставка
  • Опубліковано 7 лис 2024

КОМЕНТАРІ • 1

  • @Hamzatronics
    @Hamzatronics 10 днів тому

    Great tutorial! Integrating a water level indicator with an alarm system is such a practical way to prevent overflow issues, especially for automated irrigation or water storage systems.
    however I will suggest using this line of code to prevent the water level from going above 100%.
    ``````````````waterLevel = (waterLevel > 100) ? 100 : waterLevel;`````````````
    the line of code above is a shorthand for :
    if (waterLevel > 100) {
    waterLevel = 100;
    } else {
    waterLevel = waterLevel; //i.e remains untouched
    }
    I came here from linkedIn. nice meeting you.