Problema al compilar

zepjau
Posts: 6
Joined: Wed Oct 24, 2018 6:44 pm

Problema al compilar

Postby zepjau » Thu Oct 25, 2018 5:17 am

Buenos dias a todos.
He adquirido hace poco el modulo ESP32 (ESP32 DEVKIT V1).
He comenzado a hacer pruebas y por ahora bien, aunque no entiendo bien el tema del bluetooth ble, he probado temas de wifi y bluetooth serie.
Uso el IDE de Arduino.
Ayer me quise meter en el desarrollo para transmitir a Firebase datos, me costó encontrar una libreria que se adaptase a este modulo.
Tomé un ejemplo y al compilarlo me devuelve este error:

El Sketch usa 1446986 bytes (110%) del espacio de almacenamiento de programa. El máximo es 1310720 bytes.
Las variables Globales usan 70632 bytes (21%) de la memoria dinámica, dejando 257048 bytes para las variables locales. El máximo es 327680 bytes.
Programa muy grando: visite http://www.arduino.cc/en/Guide/Troubleshooting#size para ver cómo reducirlo.

Error compilación en tarjeta ESP32 Dev Module.


La verdad es que el probrama es bien corto y utiliza dos librerias.

Code: Select all

#include <EspFirebase.h>
#include "BluetoothSerial.h"
const char* ssid     = "";
const char* password = "";
const char* streamId   = "....................";
const char* privateKey = "....................";
String applicationCredential = ""; // Put here the name of application credential json file
String databaseURL = ""; // Put here your firebase database url
unsigned int cont = 0;
EspFirebase firebase(applicationCredential, databaseURL);
BluetoothSerial SerialBT;
int val;
void setup()
{
    Serial.begin(115200);
    delay(10);
    Serial.println();
    Serial.print("Connecting to ");
    Serial.println(ssid);
    WiFi.begin(ssid, password);
    while (WiFi.status() != WL_CONNECTED) {
        delay(500);
        Serial.print(".");
    }
    Serial.println("");
    Serial.println("WiFi connected");
    Serial.println("IP address: ");
    Serial.println(WiFi.localIP());
    SerialBT.begin("ESP32_test"); //Bluetooth device name
    Serial.println("El dispositivo BT disponible para emparejarse!");
}
int value = 0;
void loop()
{
    if (Serial.available()) {
    SerialBT.write(Serial.read());
    val = Serial.read();
    Serial.print(val);
  }
  if (SerialBT.available()) {
    Serial.write(SerialBT.read());
    val = Serial.read();
    Serial.print(val);
  }
  SerialBT.print("Dato enviado: ");
  SerialBT.println(val);
  delay(1000);
  val = '99';
//FIREBASE
firebase.setValue("temperatura", String(cont));
 //   cont++;
 delay(500);
//
}




Me imagino que puede ser por el volumen de las libreiras, pero no lo sé.
¿Se os ocurre alguna manera de solucionarlo?.
Otra cosa, como puedo borrar la memoria del ESP32?.

Gracias y un saludo,
Javier.

User avatar
loboris
Posts: 514
Joined: Wed Dec 21, 2016 7:40 pm

Re: Problema al compilar

Postby loboris » Thu Oct 25, 2018 8:52 am

To get more attention to your issue you should use Google trenslate to translate it to English (you can always include the original text too).

Para obtener más atención a su problema, debe usar el traductor de Google para traducirlo al inglés (siempre puede incluir el texto original también).

zepjau
Posts: 6
Joined: Wed Oct 24, 2018 6:44 pm

Re: Problema al compilar

Postby zepjau » Thu Oct 25, 2018 11:01 am

Good morning to everybody.
I recently acquired the ESP32 module (ESP32 DEVKIT V1).
I have started doing tests and for now, although I do not understand the bluetooth theme well, I have tried wifi and bluetooth series themes.
I use the Arduino IDE.
Yesterday I wanted to get into the development to transmit data to Firebase, I found it difficult to find a library that could adapt to this module.
I took an example and when compiling it returns this error:

The Sketch uses 1446986 bytes (110%) of the program's storage space. The maximum is 1310720 bytes.
Global variables use 70632 bytes (21%) of dynamic memory, leaving 257048 bytes for local variables. The maximum is 327680 bytes.
Very grando program: visit http://www.arduino.cc/en/Guide/Troubleshooting#size to see how to reduce it.

Compilation error on ESP32 Dev Module card.


The truth is that the program is very short and uses two libraries.



How can I solved this problem?

Regards.

User avatar
fasani
Posts: 195
Joined: Wed Jan 30, 2019 12:00 pm
Location: Barcelona
Contact:

Re: Problema al compilar

Postby fasani » Mon Oct 07, 2019 4:00 pm

I think that maybe you are selecting the wrong board in Arduino.

I highly recommend switching to PlatformIO IDE to compile things for the ESP32
https://platformio.org/install

This will make things easier and it's nice since keeps libraries for your Project inside a folder in the project itself. The devil designed how the libraries are stored in Arduino, some here, some there...I never finish to understand it ;)

---
Aprovecho para comentarte que no veo el error en el ejemplo que copias. Estas seguro de que presionas el Upload y no solo el "Build"?
epdiy collaborator | http://fasani.de Fan of Espressif MCUs and electronic design

Fernando
Posts: 1
Joined: Fri Apr 30, 2021 5:23 pm

Re: Problema al compilar

Postby Fernando » Fri Apr 30, 2021 6:06 pm

Yo con la misma placa me da el mismo error. Pero al introducir la libreria eeprom
Sospecho del compilador

Who is online

Users browsing this forum: No registered users and 30 guests