Skip to content

esp 8266 wdt reset #3535

@wanfikriMY

Description

@wanfikriMY

hi im using esp8266 and i got this error

`chksum 0x2d
csum 0x2d
v09f0c112
~ld

ets Jan 8 2013,rst cause:4, boot mode:(1,6)

wdt reset
`
can help me. im new in arduino and this for my final year project.

this is my testing code

`#include <AccelStepper.h>
#include <ESP8266WiFi.h>
#include <WiFiClientSecure.h>

#define FULLSTEP 8

const byte moto1 = 7;
const byte moto2 = 8;
const byte moto3 = 9;
const byte moto4 = 10;

const byte moto5 = 3;
const byte moto6 = 4;
const byte moto7 = 5;
const byte moto8 = 6;

char ssid[] = "DVAZ40A";
char password[] = "dvaz40axs"; // your network key

int c = 0;

AccelStepper stepper1(FULLSTEP, moto1, moto3, moto2, moto4);
AccelStepper stepper2(FULLSTEP, moto5, moto7, moto6, moto8);

int steps1 = 0;
int steps2 = 0;

void setup() {
Serial.begin(115200);

stepper1.setMaxSpeed(3000.0);
stepper1.move(1);
stepper1.setSpeed(1000);

stepper2.setMaxSpeed(3000.0);
stepper2.move(0);
stepper2.setSpeed(1000);
Serial.begin(115200);

// Set WiFi to station mode and disconnect from an AP if it was Previously
// connected
WiFi.mode(WIFI_STA);
WiFi.disconnect();
delay(100);

// attempt to connect to Wifi network:
Serial.print("Connecting Wifi: ");
Serial.println(ssid);
WiFi.begin(ssid, password);

while (WiFi.status() != WL_CONNECTED) {
Serial.print(".");
delay(500);
}

Serial.println("");
Serial.println("WiFi connected");
Serial.print("IP address: ");
Serial.println(WiFi.localIP());

}

void loop() {
c = Serial.read();

if (c == '1') {
stepper1.move(4200);
stepper1.setSpeed(1000);
}
else if (c == '2') {
stepper1.move(-4200);
stepper1.setSpeed(1000);
}
else if (c == '3'){
stepper2.move(4200);
stepper2.setSpeed(1000);
}
else if (c == '4'){
stepper2.move(-4200);
stepper2.setSpeed(1000);
}

steps1 = stepper1.distanceToGo();
stepper1.runSpeedToPosition();
steps2=stepper2.distanceToGo();
stepper2.runSpeedToPosition();

}

`

thanks in advance and sorry for my bad english

Settings in IDE

Module: Generic ESP8266 Module
Flash Size: 1M(64K)
CPU Frequency: 80Mhz
Flash Mode: qio
Flash Frequency: 40Mhz
Upload Using: SERIAL
Reset Method: ck

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions