rgrokett / ESP8266_PIRv2

ESP8266 Huzzah Deep Sleep Mode PIR Motion Alarm using IFTTT
GNU General Public License v3.0
28 stars 2 forks source link

Rebooting too fast... #4

Closed iYoungblood closed 6 years ago

iYoungblood commented 6 years ago

I think I have this implemented correctly. So thank you for that! Looks to be working great... except for one issue.

It seems like if it continues to detect motion, it keeps rebooting over and over usually before it makes it all the way through my code (a little different than what you have)... which I think is correct.

Any ideas on how you could stop this until the code is fully executed?

rgrokett commented 6 years ago

You might be able to adjust the Time Delay on the PIR sensor, unless the program is taking more than 15 seconds (which is the typical max delay limit on a PIR).

Also, if you are connecting to WiFi, it should be significantly faster to use a Static IP address instead of dynamic.

// Uncomment & update if you want to use a Static IP // (Static IP connection is much faster than DHCP) #define IP IPAddress ip(192, 168, 1, 6); IPAddress gateway(192, 168, 1, 254); IPAddress subnet(255, 255, 255, 0);

capture