I am new to Blynk. I have an arduino uno hooked up via USB. I have taken a plain vanilla example, injected the token I received, and deployed to the arduino over USB. I then tried to run the batch script but I am getting a message that states: DSR is off.
This results in the app saying the project is offline.
If your DOS window looks something like this, then that usually means you have used the correct COM port and that the board is connected and all is good (NOTE: you must keep this window open, minimised is OK, the entire time in order to maintain connection).
If like above, then then your issue may be something else with the sketch… like trying to send serial data over the same port that the USB Link is using. make sure to comment out (or remove) all Serial print commands… including #define BLYNK_PRINT Serial
Thanks for the help. I’m just using a plain vanilla sample script. I tried what you said and commented the parts of the script that has anything to do with the serial port, but I am having the same issue.
#define BLYNK_PRINT Serial // Comment this out to disable prints and save space
#include <SPI.h>
#include <Ethernet.h>
#include <BlynkSimpleEthernet.h>
#include <SimpleTimer.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "mytoken";
WidgetLED led1(V1);
SimpleTimer timer;
void setup()
{
//Serial.begin(9600); // See the connection status in Serial Monitor
Blynk.begin(auth);
timer.setInterval(1000L, blinkLedWidget);
}
// V1 LED Widget is blinking
void blinkLedWidget()
{
if (led1.getValue()) {
led1.off();
//Serial.println("LED on V1: off");
} else {
led1.on();
//Serial.println("LED on V1: on");
}
}
void loop()
{
Blynk.run();
timer.run();
}
Thanks for pointing me in the right direction. I tried this again, and am getting the same issue. I rebooted, tried to launch the batch script with the IDE closed, and then from within the Arduino IDE. I am getting the same error. Here’s the updated sketch:
#define BLYNK_PRINT SwSerial
#include <SoftwareSerial.h>
SoftwareSerial SwSerial(10, 11); // RX, TX
#include <BlynkSimpleStream.h>
char auth[] = "mytok";
void setup()
{
//SwSerial.begin(9600);
Serial.begin(9600);
Blynk.begin(Serial, auth);
}
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!
}
I tried commenting out anything to do with software serial, still no luck. DSR is off.
// #define BLYNK_PRINT SwSerial
//#include <SoftwareSerial.h>
//SoftwareSerial SwSerial(10, 11); // RX, TX
#include <BlynkSimpleStream.h>
char auth[] = "ca73d08fefd64ee6b5d722a4eee2bdea";
void setup()
{
//SwSerial.begin(9600);
Serial.begin(9600);
Blynk.begin(Serial, auth);
}
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!
}