Sketch: Terminal, takes down Particle Photon

Sketch from here:
takes Particle Photon offline

Used #include <blynk.h> instead of #include <BlynkSimpleEthernet.h>
Could this be the reason for Photon going offline?

Code used:

// This #include statement was automatically added by the Particle IDE.
#include <blynk.h>

  Blynk is a platform with iOS and Android apps to control
  Arduino, Raspberry Pi and the likes over the Internet.
  You can easily build graphic interfaces for all your
  projects by simply dragging and dropping widgets.
    Downloads, docs, tutorials:
    Sketch generator: 
    Blynk community:  
    Social networks:  
  Blynk library is licensed under MIT license
  This example code is in public domain.
  You can send/receive any data using WidgetTerminal object.
  App project setup:
    Terminal widget attached to Virtual Pin V1

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

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

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

// You can send commands from Terminal to your hardware. Just use
// the same Virtual Pin as your Terminal Widget

  // 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.println("You said:");

  // Ensure everything is sent

void setup()
  // Debug console

  for(int i=1;i<=25;i++)

  // 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("Type 'Marco' and get a reply, or type"));
  terminal.println(F("anything else and get it printed back."));

void loop()

Code resposible for this is:
terminal.write(param.getBuffer(), param.getLength());
Once this code is executed, Particle Photon shows status: Offline, in 10 seconds (Breathing Green).

What could be causing this issue?

This works:

    // Send it back
    terminal.println("You said:");

But what's wrong with the code from docs?


yes, the blynk.h can be the problem (maybe), but you didn’t mention what hardware are you using…

what i do not understand, why are you doing this:


also, did you checked the serial debug, to see if there are any clues there?

He is clearing the terminal so it looks empty. I don’t think terminal supports a clear method yet so this is one way that has been suggested before.

Hardware is the Particle Photon, with firmware 0.6.1
The code in “for” loop is to clear the terminal as @Fettkeewl mentioned… Haven’t done the serial debug yet…

A post was split to a new topic: Particle Photon problem