I am trying to follow this tutorial and I keep hitting a problem repeatedly. I checked in my code that every time it hits the line Blynk.begin(auth, ssid, pass);
, the serial monitor shows me that there was a cause:4, boot mode:(3,6) wdt reset
. I looked it up a little bit and learned that this is a "hardware watchdog reset" but I am not sure why this problem is happening. Please let me know if you guys would like anymore info. Thank you!
here is my code:
#include <ESP8266WiFi.h>
#define BLYNK_PRINT Serial // Comment this out to disable prints and save space
#include <BlynkSimpleEsp8266.h>
char auth[] = "xxx";
/* WiFi credentials */
char ssid[] = "xxx";
char pass[] = "xxx";
/* HC-SR501 Motion Detector */
#define ledPin 7
#define pirPin 2 // Input for HC-S501
int pirValue; // Place to store read PIR Value
void setup()
{
Serial.begin(115200);
Serial.println("here 1");
delay(10);
Serial.println("here stop?");
Blynk.begin(auth, ssid, pass);
pinMode(ledPin, OUTPUT);
pinMode(pirPin, INPUT);
Serial.println("here 2");
digitalWrite(ledPin, LOW);
}
void loop()
{
getPirValue();
Blynk.run();
delay(10);
Serial.println("here 3");
}
/***************************************************
* Get PIR data
**************************************************/
void getPirValue(void)
{
pirValue = digitalRead(pirPin);
if (pirValue)
Serial.println("here 4");
{
Serial.println("==> Motion detected");
Blynk.notify("===> Motion detected");
Serial.println("here 5");
delay(10);
}
digitalWrite(ledPin, pirValue);
Serial.println("here 6");
}
Serial Monitor:
[6485] Connected to WiFi
[6486] IP: xx.x.x.xx
[6486]
___ __ __
/ _ )/ /_ _____ / /__
/ _ / / // / _ \/ '_/
/____/_/\_, /_//_/_/\_\
/___/ v0.6.1 on ESP8266
[6492] Connecting to blynk-cloud.com:80
[6584] Ready (ping: 38ms).
ets Jan 8 2013,rst cause:4, boot mode:(3,6)
wdt reset
load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v8b899c12
~ld
here 1 (Serial.println in line 19 of code)
here stop? (Serial.println in line 21 of code)
Specs:
- Board: Generic ESP8266 Module
- Upload Speed: 115200
- CPU Frequency: 80MHz
- Flash Frequency: 40MHz
- Flash Mode: DOUT (compatible)
- Flash Size: 512K (no SPIFFS)
- Crystal Frequency: 26MHz
- Reset Method: ck
- Debug Port: Disabled
- Debug Level: None
- IwIP Variant: v2 Lower Memory
- VTables: Flash
- Exceptions: Disabled
- Builtin LED: 2
- Erase Flash: Only Sketch
- Espressif FW: nonos-sdk 2.2.1 (legacy)
- SSL Support: All SSL ciphers (most compatible)