-->
Page 1 of 3

[SOLVED] ESP8266 12e and HX711 crash before setup

PostPosted: Wed Sep 28, 2016 4:01 pm
by drifterz28
I am working on using some weight sensors and building some scales. I have everything setup and work / runs on the ESP but as soon as I try to get WIFI involved the sketch fails before the setup and just gives me this

Code: Select allets Jan  8 2013,rst cause:2, boot mode:(1,6)
ets Jan  8 2013,rst cause:4, boot mode:(1,6)
wdt reset


here is a link to the code on github
https://github.com/drifterz28/kegbot/bl ... kegbot.ino

thanks.

Re: ESP8266 12e and HX711 crash before setup

PostPosted: Fri Oct 07, 2016 7:53 am
by masters42
I've been having a similar problem. It looks like the HX711 with ESP8266 problems have been solved by folks before, but I'm honestly not sure-- every forum post I come across has the reboot issue, or other fundamental communications issues-- and the question never seems to get definitively answered.

I'm trying the Bogde library (https://github.com/bogde/HX711/blob/master/HX711.cpp) currently. I've successfully used the Aguegu library (https://github.com/aguegu/ardulibs/tree/master/hx711) with an Arduino previously.

(Note- my load cell / HX711 circuit has been verified with an Arduino previously; and my HUZZAH ESP8266 has worked with the test programs included, after flashing for the Arduino IDE).

The error I'm getting, seen from the serial monitor window:


ets Jan 8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v09f0c112
~ld

Re: ESP8266 12e and HX711 crash before setup

PostPosted: Sat Oct 08, 2016 8:13 am
by ChrisH
drifterz28 wrote:I am working on using some weight sensors and building some scales. I have everything setup and work / runs on the ESP but as soon as I try to get WIFI involved the sketch fails before the setup and just gives me this

Code: Select allets Jan  8 2013,rst cause:2, boot mode:(1,6)
ets Jan  8 2013,rst cause:4, boot mode:(1,6)
wdt reset



It seems like the watchdog timer (wdt) is the cause, so maybe your setup takes too much time.

So you need to "pat the dog" in the setup to keep it happy! (You could potentially disable it also..)

calling delay(0); or yield(); should do the trick.

The wdt resets if it takes longer than one second, so the first thing you could try is to lessen the delay at line 113 (Setup) (I'm not even sure that you need that loop!).

Re: ESP8266 12e and HX711 crash before setup

PostPosted: Fri Oct 14, 2016 5:21 pm
by drifterz28
Solved the issue!

so the HX711 has 2 was to set it up and when I used the

Code: Select allHX711 hx711_1(1, 0);

it would fail but in the setup function after wifi is connected and setup I used

Code: Select allhx711_1.begin(1, 0);


and everything runs!
updated code will be on github soon. I am cleaning some things up and will publish.