i want to blink an led in pin3,while any one this condiction is true:
the LDR output is below 500
2.the time is between 4-5
i have written a code but it is not blink between 4and5. even-though it blinks when the sensor value below 500
my code is given below: #include <Time.h>
void setup()
{
Serial.begin(9600);
pinMode(3, OUTPUT);
}
void loop()
{
int t;
t = hour();
int sensorValue = analogRead(A0);
if ((sensorValue<500)||(4<=t<=10))
{
digitalWrite(3, HIGH);
}
else {
digitalWrite(3, LOW);
}
}
my output is led is on for all the time