Proteus smart water detection with aduino code The code is for a program using Arduino to control an LED, buzzer, and LCD. It starts by declaring variables for the pins used in the circuit and for two integers: percentage and duration. The program uses the LiquidCrystal library for the LCD and sets up I2C communication over four wires. It initializes the LCD to a 16 character, 2-line display and sets up the serial port at a 9600 baud rate. The program runs a loop that continuously performs two functions: analyze (calculates the duration it takes for sound waves to reach the water level sensor and return) and print (prints text on the LCD screen). The program checks the distance of the water level in the tank and prints "ST-Water Level" if there is water in the tank and "Capacity in" if the distance is less than 1023 cm. If the distance is greater than or equal to 1023 cm, it prints "Distance:".
lesotlhok / aduino-smart-water-level Goto Github PK
View Code? Open in Web Editor NEWProteus smart water detection with aduino code
License: Apache License 2.0