[SOLVED] Sketch takes too much space

I’ve searched the community for an answer to this, but i couldn’t find anything useful.

I’m trying to run this sketch, for an ESP8266-12 standalone:

#define BLYNK_PRINT Serial    // Comment this out to disable prints and save space
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).

char auth[] = "xxx";

void setup()
{
  Serial.begin(9600);
  Blynk.begin(auth, "xxx", "xxx");

}

void loop()
{
  Blynk.run();
}

Quite simple. And even though is a really simple code, when i try to compile it (also, it takes forever to compile this simple code), i’m getting this space usage alerts:

Sketch uses 239,323 bytes (55%) of program storage space. Maximum is 434,160 bytes.
Global variables use 33,048 bytes (40%) of dynamic memory, leaving 48,872 bytes for local variables. Maximum is 81,920 bytes.

I don’t know, but that seems way off. Even I don’t disable the first #define, it shouldn’t take that much space.

Thank you for your attention.

239,323 bytes of program memory looks about right and if you compile a blank sketch for an ESP you should see that it uses around 216,478 bytes,

Which ESP-12 do you have as you have to set the memory capacity in the board parameters? The settings are from 512K to 4M. With 1M and above giving you 1MB program space and therefore blank sketches using about 20% of the capacity.

1 Like

Thanks for the reply. Not sure which flash size i have on this board, it’s poorly documented and i don’t know how to figure that out.

If you bought it recently it is likely to be 4M.

You can check with one of the example sketches, in ESP8266 examples select the CheckFlashConfig sketch.

Hi, Where can I find the ESP8266 example sketches like CheckFlashConfig?
I am new to Blynk and plan to use it with a standalone ESP8266.
Thanks

@tomega3

Welcome to Blynk.

Please read up on general rules (link below)… please don’t post new questions on really old threads and check out the Sketch Builder (on the top right of this page) for examples.

Thank you.

Hi Gunner, I will start new posts as you suggested, I check the sketch builder for the esp8266 examples and did not see the CheckFlashConfig sketch. Did I miss it?
Thanks

I will answer this here, but refer any new questions in your new thread.

As this is a Blynk forum that heavily uses ESP… but is NOT an official ESP troubleshooting forum or site, the sketch in question is found (via Google) here:

or here… etc…