App disconnecting my projects

Hi, Im early stages of learning to use Blynk. I’m currently trying to learn how to use buttons etc. I’ve tried this example code to set up a basic step button on V1. The app just keeps saying the project is offline. I’m using an iPhone. Here is the code. minus my login details.

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


#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>

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

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

// This function will be called every time Slider Widget
// in Blynk app writes values to the Virtual Pin V1
BLYNK_WRITE(V1)
{
  int pinValue = param.asInt(); // assigning incoming value from pin V1 to a variable
  // process received value
  Serial.print(pinValue);
}


void setup()

{
  // Debug console
  Serial.begin(9600);
  Blynk.begin(auth, ssid, pass);
  
  // You can also specify server:
  //Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 80);
  //Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8080);
}

void loop()
{
  Blynk.run();
  // You can inject your own code or combine it with other sketches.
  // Check other examples on how to communicate with Blynk. Remember
  // to avoid delay() function!
}

Meant to add, I’m using a D1 mini and I’m also having problems with other projects that were previously working also disconnecting.

What are you seeing in your serial monitor?

Pete.

HI Pete,

I’m getting this in the serial monitor…

ets Jan 8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 1392, room 16
tail 0
chksum 0xd0
csum 0xd0
v3d128e5c
~ld

Do you have anything connected to your D1 Mini other than the USB cable?

I’m guessing that to see these boot messages you have your serial monitor baud rate set to 74880.

If that’s the case the set your debug serial baud rate to be the same:

  Serial.begin(74880);

and see if that provides any more data.

Pete.

1 Like

Pete you are a star! I did that and got this…

ets Jan 8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 1392, room 16
tail 0
chksum 0xd0
csum 0xd0
v3d128e5c
~ld
[59] Connecting to BTHub6-P67Q

it made me realise it wasn’t connecting and only then did I realise (I’m embarrassed to say) I had made a typo on my SSID. I corrected it and now and it is connecting fine. Thanks again.

1 Like

No problem!
I always like to use 74880 as my debug baud rate because you can see both the boot messages from the D1 Mini and the debug messages without having to switch rates in your serial monitor.

Pete.

1 Like