Ok so could you apply your thery to this
int sensorPin = A0; // select the input pin for the soil detector
unsigned int sensorValue = 0; // variable to store the value coming from the soil detector
void setup()
{
pinMode(13, OUTPUT);
//Start Serial port
Serial.begin(9600); // start serial for output - for testing
}
void loop()
{
// read the value from the soil detector:
sensorValue = analogRead(sensorPin);
if(sensorValue<400) digitalWrite(13, HIGH); // set the LED on
else digitalWrite(13, LOW); // set the LED on
I want the led just to blink once say 1 second even if the input condition stays the same.. obviously if the input changed >400 then this should reset..
does this make any sense..
please help
david