Blynk Connect problem

[0] 
    ___  __          __
   / _ )/ /_ _____  / /__
  / _  / / // / _ \/  '_/
 /____/_/\_, /_//_/_/\_\
        /___/ v0.5.3 on Arduino Uno

  Give Blynk a Github star! => https://github.com/blynkkk/blynk-library

[166] Connecting...
[2228] Login timeout
[5228] Connecting...
[10268] Connecting...
[15308] Connecting...
[17348] Login timeout
[20348] Connecting...
[22388] Login timeout
[25388] Connecting...
[27427] Login timeout
[30427] Connecting...
[32467] Login timeout
[35467] Connecting...
[40507] Connecting...
[45547] Connecting...
[47587] Login timeout
[50587] Connecting...
[52627] Login timeout
[55627] Connecting...
[57667] Login timeout
[60667] Connecting...
[62707] Login timeout
[65707] Connecting...
[70746] Connecting...
[75786] Connecting...
[77826] Login timeout
[80826] Connecting...
[82866] Login timeout
[85866] Connecting...
[87906] Login timeout
[90906] Connecting...
[92946] Login timeout
[95946] Connecting...
[100986] Connecting...
[106027] Connecting...
[108066] Login timeout
[111066] Connecting...
[113106] Login timeout
[116106] Connecting...
[118146] Login timeout
[121146] Connecting...
[123186] Login timeout
[126186] Connecting...
[128226] Login timeout
[131226] Connecting...
[136266] Connecting...
[141306] Connecting...
[143346] Login timeout
[146347] Connecting...
[148386] Login timeout
[151386] Connecting...
[153426] Login timeout
[156426] Connecting...
[158466] Login timeout
[161466] Connecting...
[166506] Connecting...
[171546] Connecting...
[173586] Login timeout
[176586] Connecting...
[178626] Login timeout
[181626] Connecting...
[183666] Login timeout
[186667] Connecting...
[188706] Login timeout
[191706] Connecting...
[196746] Connecting...
[201786] Connecting...
[203826] Login timeout
[206826] Connecting...
[208866] Login timeout
[211866] Connecting...
[213906] Login timeout
[216906] Connecting...
[218946] Login timeout
[221946] Connecting...

Code I have tried is

#define BLYNK_PRINT Serial


#include <BlynkSimpleStream.h>
#include <SoftwareSerial.h>

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

SoftwareSerial SwSerial(10, 11); // RX, TX

// Attach virtual serial terminal to Virtual Pin V1
WidgetTerminal terminal(13);

// You can send commands from Terminal to your hardware. Just use
// the same Virtual Pin as your Terminal Widget
BLYNK_WRITE(13)
{

  // if you type "Marco" into Terminal Widget - it will respond: "Polo:"
  if (String("Marco") == param.asStr()) {
    terminal.println("You said: 'Marco'") ;
    terminal.println("I said: 'Polo'") ;
  } else {

    // Send it back
    terminal.print("You said:");
    terminal.write(param.getBuffer(), param.getLength());
    terminal.println();
  }

  // Ensure everything is sent
  terminal.flush();
}

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

  // Blynk will work through SoftwareSerial
  // Do not read or write this serial manually in your sketch
  SwSerial.begin(9600);
  Blynk.begin(SwSerial, auth);

  // This will print Blynk Software version to the Terminal Widget when
  // your hardware gets connected to Blynk Server
  terminal.println(F("Blynk v" BLYNK_VERSION ": Device started"));
  terminal.println(F("-------------"));
  terminal.println(F("Type 'Marco' and get a reply, or type"));
  terminal.println(F("anything else and get it printed back."));
  terminal.flush();
}

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

I dont know why it’s not connecting???

You didn’t read the instructions before posting your topic :stuck_out_tongue:

I fixed the formatting… but have you read all the instructions and searched this forum about using the USB link?

You are trying to connect using the Software Serial port… but your USB script, running on your PC, will expect to be using the primary Serial port.

The SwSerial is for debugging (But you would also need a TTL-USB adapter and another terminal program as the IDE Serial Monitor cannot be used along with the USB link).