Hello,
I am coplectly new in this "waters".
I build a small flawer water system with the bottom code:
==============================================================
#include <PCD8544.h>
PCD8544 lcd;
int sensor_pin = A0 ;
int output_value ;
int valve_pin = 8 ;
void setup ( ) {
Serial.begin(9600);
Serial.println("Reading From the Sensor ...");
pinMode (valve_pin, OUTPUT);
delay(3000);
}
void loop ( ) {
output_value = analogRead (sensor_pin);
output_value = map (output_value , 1023 , 0 , 0 , 100);
Serial.print("Mositure : ");
Serial.print(output_value);
Serial.println("%");
if (output_value < 75)
{
digitalWrite (valve_pin , LOW); //Relay operates on opposite signal
delay(4000);
}
else
{
digitalWrite (valve_pin , HIGH); //Relay operates on opposite signal
delay(4000);
}
delay(4000);
}
==============================================================
Almost work fine, but has one problem.
When humidity is 76-77% the pump stop for 2.3 min. then starts again for 6 sec. and again, and again the same cycle!
Please tell me, what is wrong?
Thanks in advance.
Regards
318/5000