Arduino isue WeMos D1 and Firebase, Exception (28)

0

I'm having an error with the arduino WeMos D1 Wifi. When I'm trying to get for 60th time the value of the data from realtime Firebase, I get an error.

   Exception (28):
epc1=0x4020b95c epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000034 depc=0x00000000

>>>stack>>>

ctx: cont
sp: 3ffffc60 end: 3fffffc0 offset: 01a0
3ffffe00:  0000000b 3ffeec68 3ffefec8 402062d4  
3ffffe10:  3ffe87ae 000001bb 3ffefec8 402071ac  
3ffffe20:  3ffe8862 0000003b 3ffefec8 402075d8  
3ffffe30:  0000003b 3ffeec68 0000002e 402025d8  
3ffffe40:  3ffffe88 0000003b 3ffffe70 40207f68  
3ffffe50:  3ffeec64 3ffffe70 3ffe8862 3ffffef0  
3ffffe60:  3ffeec64 3ffffeb4 3ffefec4 40203eab  
3ffffe70:  3fff28fc 003b003f 00fffeb4 3fff0154  
3ffffe80:  0049004f 00fefc44 3ffeff5c 0017001f  
3ffffe90:  00000000 0000008e 3ffefc59 3ffffef0  
3ffffea0:  3ffeec64 3ffe87df 3ffefd0c 40201c08  
3ffffeb0:  00000000 3ffeff98 00000001 3ffeed58  
3ffffec0:  3fffff6c 3ffffef0 3ffe87f8 4020259c  
3ffffed0:  3ffffef8 00000020 3fffff6c 3ffeed58  
3ffffee0:  3fffff6c 3ffefd0c 3ffeec60 40202e8d  
3ffffef0:  3ffeeca0 3ffefd58 010624dd 00000000  
3fffff00:  3fffdad0 3ffeec60 3fffff60 40202ece  
3fffff10:  3ffe8780 00000015 3fffff6c 40207f1f  
3fffff20:  00000015 3ffeecdc 3ffe88f6 4020791d  
3fffff30:  01361c21 00000015 3fffff6c 40207f68  
3fffff40:  3fffdad0 3fffff6c 3ffe8780 40207f9e  
3fffff50:  3fffdad0 00000000 3ffeeb58 4020153e  
3fffff60:  007a1200 476575e7 80feeb00 3ffefc44  
3fffff70:  0015001f 00000000 3ffeeb00 402013f8  
3fffff80:  00000000 00000000 00000001 401003a4  
3fffff90:  3fffdad0 00000000 3ffeed18 3ffeed58  
3fffffa0:  3fffdad0 00000000 3ffeed18 40208e44  
3fffffb0:  feefeffe feefeffe 3ffe8568 40101001  
<<<stack<<<

I search information, but I dindn't fint anything relevant to my error.

The loop code is this;

void loop() {

 // SUBIDA DE DATOS DE DHT11
  if ((millis() - temp) >= 3600) { // CADA 1 MIN
    humedad = dht.readHumidity(); // ESCANEA LA HUMEDAD EN %
    temperatura = dht.readTemperature(); // ESCANEA LA TEMPERATURA EN ÂșC
    Serial.println("LEE DHT11");
    Firebase.setInt(ruta + "humedad", humedad); // SUBE LA HUMEDAD A FIREBASE
    Firebase.setInt(ruta + "temperatura", temperatura); // SUBE LA TEMPERATURA A FIREBASE
    temp = millis(); // REINICIA EL CHEQUEO
  } else {
    temp = millis(); // SUMA 1 AL CHEQUEO
  }


  // CONTROL DE LEDS


    if(millis() - color.temp >= 500){
        color.newC = Firebase.getString("domotica/WeMos1/color"); // RECIBE EL COLOR DE FIREBASE
        test=test+1;
        //Serial.println(color.newC);
        if (color.newC != color.oldC){
          color.oldC[0] = '\0';
          color.oldC = color.newC;
          color.newC = '#' + color.newC; // AGREGA LA ALHMOADIA AL STRING HEX
          color.number = (long) strtol( &color.newC[1], NULL, 16); // CONVIERTE LA STRING HEX EN UN HEX
          color.r = color.number >> 16; // VALOR ROJO
          color.g = color.number >> 8 & 0xFF; // VALOR VERDE
          color.b = color.number & 0xFF; // VALOR AZUL
          color.newC[0] = '\0';
          Serial.println("modified");
          for (int i = 0; i < NUM_LEDS; i++) { // EMPIEZA UNA LOOP PARA PONER EL COLOR A TODOS LOS LEDS
            leds[i].setRGB(color.r, color.g, color.b); // PONE EL COLOR AL LED "I"
            }  FastLED.show(); // ACTUALIZA EL LED Y COLOCA LOS COLORES
        } color.temp = millis();
          Serial.println(test);
    }



  //for(int i = 0;i <5; i++){Firebase.setInt("Teo", i);delay(200);}



}

I think maybe the cause is too fast request one behind other in an interval of 500ms.

Decoding this I get this output:

Exception 28: LoadProhibited: A load referenced a page mapped with an attribute that does not permit loads
PC: 0x4020b95c: HTTPClient::connected() at C:\Users\teoda\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.6.0\libraries\ESP8266HTTPClient\src\ESP8266HTTPClient.cpp line 472
EXCVADDR: 0x00000034

Decoding stack results
0x402062d4: HTTPClient::disconnect(bool) at C:\Users\teoda\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.6.0\libraries\ESP8266HTTPClient\src\ESP8266HTTPClient.cpp line 435
0x402071ac: HTTPClient::end() at C:\Users\teoda\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.6.0\libraries\ESP8266HTTPClient\src\ESP8266HTTPClient.cpp line 425
0x402075d8: HTTPClient::begin(String, unsigned short, String, String) at C:\Users\teoda\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.6.0\libraries\ESP8266HTTPClient\src\ESP8266HTTPClient.cpp line 379
0x402025d8: std::string::_Rep::_M_destroy(std::allocator  const&) at c:\users\teoda\documents\arduinodata\packages\esp8266\tools\xtensa-lx106-elf-gcc\2.5.0-4-b40a506\xtensa-lx106-elf\include\c++\4.8.2\bits/basic_string.tcc line 452
0x40207f68: String::copy(char const*, unsigned int) at C:\Users\teoda\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.6.0\cores\esp8266\WString.cpp line 214
0x40203eab: FirebaseHttpClientEsp8266::begin(std::string const&, std::string const&) at C:\Users\teoda\Documents\Arduino\libraries\firebase-arduino-master\src\FirebaseHttpClient_Esp8266.cpp line 51
0x40201c08: FirebaseRequest::sendRequest(std::string const&, std::string const&, char*, std::string const&, std::string const&) at C:\Users\teoda\Documents\Arduino\libraries\firebase-arduino-master\src\Firebase.cpp line 73
0x4020259c: std::basic_string  , std::allocator  >::basic_string(char const*, std::allocator  const&) at c:\users\teoda\documents\arduinodata\packages\esp8266\tools\xtensa-lx106-elf-gcc\2.5.0-4-b40a506\xtensa-lx106-elf\include\c++\4.8.2\bits/basic_string.tcc line 218
0x40202e8d: FirebaseArduino::getRequest(String const&) at C:\Users\teoda\Documents\Arduino\libraries\firebase-arduino-master\src\FirebaseArduino.cpp line 101
0x40202ece: FirebaseArduino::getString(String const&) at C:\Users\teoda\Documents\Arduino\libraries\firebase-arduino-master\src\FirebaseArduino.cpp line 132
0x40207f1f: String::reserve(unsigned int) at C:\Users\teoda\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.6.0\cores\esp8266\WString.cpp line 146
0x4020791d: Print::write(char const*) at C:\Users\teoda\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.6.0\cores\esp8266/Print.h line 60
0x40207f68: String::copy(char const*, unsigned int) at C:\Users\teoda\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.6.0\cores\esp8266\WString.cpp line 214
0x40207f9e: String::String(char const*) at C:\Users\teoda\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.6.0\cores\esp8266\WString.cpp line 36
0x4020153e: loop() at C:\Users\teoda\Documents\Domotica/Domotica.ino line 104
0x402013f8: setup() at C:\Users\teoda\Documents\Domotica/Domotica.ino line 81
0x401003a4: ets_post(uint8, ETSSignal, ETSParam) at C:\Users\teoda\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.6.0\cores\esp8266\core_esp8266_main.cpp line 159
0x40208e44: loop_wrapper() at C:\Users\teoda\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.6.0\cores\esp8266\core_esp8266_main.cpp line 179
c
firebase
loops
arduino
esp8266
asked on Stack Overflow Nov 17, 2019 by Teodor Din • edited Nov 27, 2019 by Teodor Din

1 Answer

0

You declare your leds array as an array with 30 elements (0 to 29) ... and in this for - loop

for (int i = 0; i < NUM_LEDS + 1; i++)

you access leds[30] which is out of bounds ... change your for - loop to

for (int i = 0; i < NUM_LEDS; i++)

and it should work.

answered on Stack Overflow Nov 25, 2019 by PrfctByDsgn

User contributions licensed under CC BY-SA 3.0