Using the new Arduino IDE for ESP8266 and found bugs, report them here

Moderator: igrr

User avatar
By tytower
#20492 If it keeps resetting have a look in the code for any statements where the program can hang for a second. while(1) will do this ,while(::) I have seen as well. I suspect the watch dog timer is being triggered and that can be many things . Another one is to try to read an array but the index is out of bounds .
memory size should not matter.
User avatar
By bernd331
#20494 Hi,

i had also problems with analograd. Now it works. First was to define the variable which keeps the analog value as uint.

Second was NOT to use (arduino) analogread. Instead to use the other (adc_read?) function from the SDK (?). I'm at work but later at home I can take a look what exactly it was.

Greetz, Bernd

EDIT: I think it was this: uint16 adc = system_adc_read();
User avatar
By Tawhiz20
#20495
tytower wrote:If it keeps resetting have a look in the code for any statements where the program can hang for a second. while(1) will do this ,while(::) I have seen as well. I suspect the watch dog timer is being triggered and that can be many things .

Thanks Tytower... but the program is VERY simple... none of the described problem would likely occur...
Code: Select allvoid setup() {
  Serial.begin(9600);
}

void loop() {
  int sensorValue = analogRead(A0);
  Serial.println(sensorValue);
  delay(1000);       
}

but I also did a run with the Watchdog disabled... same result.. :cry:
User avatar
By Tawhiz20
#20497
bernd331 wrote:I'm at work but later at home I can take a look what exactly it was.
EDIT: I think it was this: uint16 adc = system_adc_read();

Thanks Bernd.... looking it up would be greatly appreciated.. I tried to find it myself but was unsuccesfull..