@Imran123 Something to note… if you do have a USB-TTL adapter, then it will get it’s own port in the PC, but you CAN NOT use the IDE SM to view it, as the IDE SM will always grab the programming port (currently being used by the USB-link).
Using another terminal program like Termite will work in that case.
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
}
hey #Costas#Imran123#Gunner …dudezz lov u a lott…My entire college students couldnt do this,even final yea studentz…but i made it with ua helpp…
Thanx a lot buddieeessss…