fix pir false triggering
This commit is contained in:
parent
99a57c594c
commit
a53fd957af
|
@ -222,7 +222,7 @@ build_flags =
|
||||||
-D dataDHT22_humidity_minchange=1.0
|
-D dataDHT22_humidity_minchange=1.0
|
||||||
|
|
||||||
-D SENSOR_PIR
|
-D SENSOR_PIR
|
||||||
-D PIRPIN=D0
|
-D PIRPIN=D6
|
||||||
-D dataPIR_readdelay=100
|
-D dataPIR_readdelay=100
|
||||||
-D dataPIR_senddelaymax=1000*60*10
|
-D dataPIR_senddelaymax=1000*60*10
|
||||||
|
|
||||||
|
|
|
@ -82,9 +82,12 @@ struct sensordata
|
||||||
|
|
||||||
|
|
||||||
#ifdef SENSOR_PIR
|
#ifdef SENSOR_PIR
|
||||||
// PIR Sensors HC-SR501 (modified to put out shortest pulse time short pins 5 and 6 of ic)
|
// PIR Sensors HC-SR501
|
||||||
//pir sensor needs 5v through an inductor for filtering. output level is 3.3v
|
// pir sensor needs 5v through an inductor for filtering. output level is 3.3v
|
||||||
//hc-sr501 should also be a few cm away from the esp. interference can cause false triggering
|
// 100nF capacitor should be soldered between pins 12 and 13 of BISS0001 to stop interference from esp causing false triggers (in some setups). source: https://www.letscontrolit.com/forum/viewtopic.php?t=671
|
||||||
|
// hc-sr501 should also be a few cm away from the esp. interference can cause false triggering
|
||||||
|
// poti closer to jumper is sensitivity (cw increases). other poti is pulse time (cw increases).
|
||||||
|
// time set to output around 30s pulse
|
||||||
sensordata dataPIR;
|
sensordata dataPIR;
|
||||||
bool value_PIR=false;
|
bool value_PIR=false;
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue