New progress
I have runned the following code and it run successfully
//#define BLYNK_PRINT SwSerial // ONLY AVAILABLE IF YOU HAVE A USB2TTL
//#include <SoftwareSerial.h> // ONLY AVAILABLE IF YOU HAVE A USB2TTL
//SoftwareSerial SwSerial(10, 11); // RX, TX ONLY AVAILABLE IF YOU HAVE A USB2TTL
#include <BlynkSimpleStream.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "xxxxxxxxxxxx";
BlynkTimer timer;
// This function sends Arduino's up time every second to Virtual Pin (5).
// In the app, Widget's reading frequency should be set to PUSH. This means
// that you define how often to send data to Blynk App.
void myTimerEvent()
{
// You can send any value at any time.
// Please don't send more that 10 values per second.
if(analogRead(A1>0))
Blynk.virtualWrite(V5, 255);
else
Blynk.virtualWrite(V5,0);
}
void setup()
{
// Debug console ONLY AVAILABLE IF YOU HAVE A USB2TTL
//SwSerial.begin(9600);
// Blynk will work through Serial
// Do not read or write this serial manually in your sketch
Serial.begin(9600);
Blynk.begin(Serial, auth);
// Setup a function to be called every second
timer.setInterval(1000L, myTimerEvent);
}
void loop()
{
Blynk.run();
timer.run(); // Initiates BlynkTimer
}