Hi,
I was trying to save ram space today by using the PROGMEM keyword to put blynk’s ssid and a few other string constants in program memory instead of dynamic ram. This caused blynk to just stop connecting. It didn’t even display the SSID correctly when it was starting up. Not sure why this is happening but it was hard to debug because it happened in a program where I had to set BLYNK_PRINT off, so it wasn’t immediately obvious that it was not connecting because the SSID was corrupted.
Anyway, you can easily reproduce this in the bynkblink sample sketch, just change:
const char ssid[] = “yourapname”;
-TO
const char ssid[] PROGMEM = “yourapname”;
And Blynk will not connect, if you have BLYNK_PRINT on, you will see the connecting message but the name of the machine will be blank or garbage
Changing auth, ssid and password to PROGMEM saves 70 bytes of dynamic memory which doesn’t sound like much but can be a big deal on Arduino Uno with only 2048 bytes of ram!
Anyway, my setup is Arduino 1.8.5, Arduino Uno, CC3000 shield, adafruit v2 motor shield, downloaded the latest blynk on friday.
Please let me know if you can reproduce this or if I am doing something that’s basically wrong.
Using PROGMEM
for ssid and pass is not supported out of the box. The library is open-source so feel free to modify it to match your needs.
Hi,
I didn’t realize that when using PROGMEM exta code ( pgm_read_word ) was required to get a valid pointer to the data stored this way. I figured the declared pointer would just be pointing at a read-only FLASH address and that would be it. Sorry.
Regarding needing code, I said i used the BlynkBlink sample with just the one line changed. Didn’t think it was necessary to post the whole sample when only 1 line was changed in the code that comes with Blynk.
Thanks for the help!
Switch to ESP platform, Wemos D1 for example. It has loads more memory, you don’t have to worry about it anymore when working with those. They come even cheaper than Arduino boards 
Planning to switch to ESP32 soon. I’m doing a 2-wheel balancing bot (like a segway) and happened to have an Arduino Uno hardware setup from an old project that was all wired up and ready to use (except for software) and decided to do a proof of concept with that before buying and building something with all new parts.
The final project would never fit on an Uno, but the basic code to stationary balance the bot fits, so I can work out details about the motors, size of the frame…etc before scratch build something.