EL SIGUIENTE ES EL ALGORITMO PARA ARDUINO UNO, PROYECTO SENSOR HIDROMETRO
#void setup() {
#
# Serial.begin(115200);
#}
#
#void loop() {
# // put your main code here, to run repeatedly:
# int lectura = analogRead(A0);
#
# Serial.print("La Lectura es: ");
# Serial.println(lectura);
#
# // lecturas entre 1000 y 1023
# if (lectura >= 1000){
# Serial.println(">> El sensor esta desconectado o seco <<");
# }
# else if (lectura <1000 && lectura >= 600){
# Serial.println(">> El suelo esta seco <<");
# }
# else if (lectura <600 && lectura >= 370){
# Serial.println(">> El suelo esta humedo <<");
# }
# else if (lectura < 370){
# Serial.println(">> El sensor esta bajo el agua <<");
# }
# delay(5000);
#}