#define BLYNK_PRINT Serial // Comment this out to disable prints and save space
#include <BlynkSimpleStream.h>
#include <SoftwareSerial.h>
SoftwareSerial SwSerial(2, 3); // RX, TX
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "***************************************";
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);
}
void loop()
{
Blynk.run();
}
C:\Users\Tony\Documents\Arduino\libraries\Blynk\scripts>blynk-ser.bat -c COM10
Connecting device at COM10 to blynk-cloud.com:8442…
OpenC0C("\.\COM10", baud=9600, data=8, parity=no, stop=1) - OK
Connect(“blynk-cloud.com”, “8442”) - OK
InOut() START
DSR is OFF
OK, have you tested connection using the Nano’s built in port… not as convenient for long term, but lets make sure your auth code works and all.
If so, then as you are using Soft Serial, I suspect you have some TTL to USB adapter that is communicating to COM10. First, confirm that the COM port is correct for the device. Windows device manager can show that. And also if there are any driver issues… I get those occasionally on my Win 10 setup as I also use USB on three different boards, with one using a TTL adapter.
You could also Stop the script and use a basic terminal program, like Termite, to check that the auth code is being transmitted OK through the TTL adapter.
Connecting device at COM6 to blynk-cloud.com:8442… OpenC0C("\.\COM6", baud=9600, data=8, parity=no, stop=1) - OK Connect(“blynk-cloud.com”, “8442”) - OK InOut() START DSR is OFF
My “TOOLS” does not have the Blynk: Run USB script.
@tbarritt the screenshot for the USB connection confirms you are connected to the server. You might want to remove the screenshot though as it shows your server access details.
It does?? I have seen that when I haven’t got my USB link running… thus no server connection. That is just the UNO output as it is trying to handshake with it’s auth code (this is a tin can and string link for us non WiFi folk ).
@tbarritt and yes… just regenerate (refresh) your auth code to keep out the snoops