int SENSOR=3;
int LED =13;
void setup()
{
pinMode(SENSOR,INPUT);
pinMode(LED,OUTPUT);
}
void loop() {
int sense = digitalRead(3);
if(sense ==0)
{
analogWrite(13, map(23,20,100,0,255));
}
else
{
analogWrite(13, map(70,20,100,0,255));
}
//digitalWrite(13, digitalRead(3));
// put your main code here, to run repeatedly:
}
however is there any possible code to reduce the detention blocked 3secs?
If you change the hardware: yes. The time a trigger is inhibited is defined by the resistor and capacitor connected to pin 5 and 6 of the BISS0001. The time calculates as 24 * R33 * CY2 (schematic).
pylon:
If you change the hardware: yes. The time a trigger is inhibited is defined by the resistor and capacitor connected to pin 5 and 6 of the BISS0001. The time calculates as 24 * R33 * CY2 (schematic).
I observed the following behaviour: if my HC-SR501 detects any motion while in detention time (approx 4secs in my case), it will unexpectedly trigger right after the detention time has elapsed.
I expected that the sensor ignores any motion it might have detected while it had been within the detention period. Instead, it seems that the sensor memorizes the suppressed trigger and postphones it until the detention time has elapsed.
Anyone who can confirm that this is normal behaviour for this sensor?
If it is normal, is there a reason for this behaviour?