BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

Blynk connects and then drops connection


#1

Hi All,





#include <ESP8266_Lib.h>
#include <BlynkSimpleShieldEsp8266.h>
#define EspSerial Serial
#include <SoftwareSerial.h>
#define ESP8266_BAUD 9600

char auth[] = "b1e93fcd7117492a866NOPEda";
char ssid[] = "Dan's iPhone";
char pass[] = "######";

SoftwareSerial debugSerial(10, 11); // RX, TX
WidgetTerminal terminal(V0);
ESP8266 wifi(&EspSerial);

void setup()
{
  // Debug console
  debugSerial.begin(9600);
  debugSerial.println("test");

  delay(10);

  // Set ESP8266 baud rate
  EspSerial.begin(ESP8266_BAUD);
  delay(10);
  debugSerial.println("before connect");
  Blynk.begin(auth, wifi, ssid, pass, "#######", 8080);
  debugSerial.println("after connect");
  terminal.println("Terminal print");
  terminal.flush();
}

BLYNK_WRITE(V1)
{
  terminal.println("PRESSED");
  terminal.flush();
}

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


Now, it connects to my local Blynk server just fine and I can see the terminal print and if I press V1 quick enough, I can see “PRESSED”, but then it just disconnects for absolutely no reason and never connects again.

I slapped the expansion board onto an Arduino Mega just for the fun of it and everything is working perfectly fine, but as soon as I revert back to the UNO above behavior starts happening again.

Would you guys have an idea why that might be?

Cheers,
Dan


#2

Figured it out. It was a memory issue; anything above 67% SRAM caused these issues to happen. 67% or below was working fine.

Cheers,
Dan