Blynk Sketch on Nano produces memory issues

This sketch for Arduino nano:

renders the following error:

Arduino: 1.8.5 (Windows 7), Board: “Arduino Nano, ATmega168”

Sketch uses 26490 bytes (184%) of program storage space. Maximum is 14336 bytes.

Global variables use 1343 bytes (131%) of dynamic memory, leaving -319 bytes for local variables. Maximum is 1024 bytes.
Sketch too big; see http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing it.
Error compiling for board Arduino Nano.

so the question is: is there a way to get blynk running on an Atmega168? are there certain settings that I need to change?

I’m not really interested in the above sketch, but as I get mem issues in my own sketch I thought I try out a ‘default’ sketch first…no luch there either.

edit: note that I tried using:

#define BLYNK_PRINT Serial
#define BLYNK_NO_BUILTIN
#define BLYNK_NO_INFO
#define BLYNK_NO_FANCY_LOGO
#define BLYNK_NO_FLOAT

still not working

no one, really?

Hi wolph42,
have you tried to comment on the line #define BLYNK_PRINT Serial ?
in this way: //#define BLYNK_PRINT Serial

regards

yup, that too.

I’m not aware of any :wink:

The smallest I managed to fit the working code in (some sensor, Blynk, LED display…) is about 25k on ATMEGA32… (the same amount as casual UNO)

Hey! I managed to fit Blynk into 16kB of ATMEGA16 flash with ESP WiFi connectivity! :star_struck:

Using library Blynk at version 0.5.3 in folder: D:\Arduino\Szkice\libraries\Blynk 
Sketch uses 14698 bytes (92%) of program storage space. Maximum is 15872 bytes.
Global variables use 680 bytes (66%) of dynamic memory, leaving 344 bytes for local variables. Maximum is 1024 bytes.

I know it wasn’t the question, but I couldn’t resist and had to find the setup that fits into 16kB flash :joy:

can you share that sketch/setup?

Tomorrow… I’m just finishing this day … :sleeping:

Here you have: But hardly usable, because what is left after disabling built-in functionality?? I have NO_BUILTIN declared in library config, so here it is omitted

/* Comment this out to disable prints and save space */
//#define BLYNK_PRINT Serial
#define BLYNK_NO_INFO
#define BLYNK_NO_FANCY_LOGO
#define BLYNK_NO_FLOAT

#include <ESP8266_Lib.h>
#include <BlynkSimpleShieldEsp8266.h>

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "YourAuthToken";

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "YourNetworkName";
char pass[] = "YourPassword";

// Hardware Serial on Mega, Leonardo, Micro...
#define EspSerial Serial

// or Software Serial on Uno, Nano...
//#include <SoftwareSerial.h>
//SoftwareSerial EspSerial(2, 3); // RX, TX

// Your ESP8266 baud rate:
#define ESP8266_BAUD 115200

ESP8266 wifi(&EspSerial);

void setup()
{
  // Debug console
  //Serial.begin(9600);

  delay(10);

  // Set ESP8266 baud rate
  EspSerial.begin(ESP8266_BAUD);
  delay(10);

  Blynk.begin(auth, wifi, ssid, pass);
}

void loop()
{
  Blynk.run();
}
Using library BlynkESP8266_Lib in folder: D:\Arduino\Szkice\libraries\BlynkESP8266_Lib (legacy)
Using library Blynk at version 0.5.3 in folder: D:\Arduino\Szkice\libraries\Blynk 
Sketch uses 14698 bytes (92%) of program storage space. Maximum is 15872 bytes.
Global variables use 680 bytes (66%) of dynamic memory, leaving 344 bytes for local variables. Maximum is 1024 bytes.

thnx ill check this out…probly in a couple of weeks (holiday)