How to Use SoftwareSerial for debug

I am seeking help with Atmega328p and SIM800 in Blynk library.

I am using bare board Atmega328P which i wired SIM800L to hardware USART and direct debugging to SoftwareSerial. I did something like;

#include <SoftwareSerial.h>
SoftwareSerial debug(6, 7);
#define BLYNK_PRINT debug

Though it compiled no error but I am not getting any print out from debug.
What am I doing wrong?

Secondly, I wish to ask if anyone had lay hands of blynk library in C.
I wish if i could get my minimal blynk c library just for basic functionality i wish to support.

Thanks in advance.

You need to connect a TTL to USB adapter (FTDI adapter) to pins 6&7 and plug it in to a USB port on your computer. You’ll then have an additional COM port appear on your computer. Open this with a serial monitor and you’ll see your debug messages.

I’m not aware of any C libraries for Blynk, only the regular C++ libraries.

Pete.

Yes Sir.
Thanks once again.

I did just that,
My USB-TTL converter installed in my laptop, i connected pin 6 (RxD) and 7(TxD) to the atmega328p.

Though i have my app remotely connected to the hardware, the issue is, sometimes it takes much time to connect, so wish to see where the issue is. maybe the SIM800L network registration to local network.

I don’t really understand what it is that you are asking.

Pete.

:smiley: :smiley: :smiley:
Sorry to disturb you.

in blynk arduino library, there is provision for debugging which by default is using hardware serial.
like is —>
#define BLYNK_PRINT Serial;

I then changed it to
SoftwareSerial debug(6, 7);
#define BLYNK_PRINT SoftwareSerial;
i am using pins 6 & 7 connected to debug USB-TTL converter interface.
now no data is coming from debug interface.

This defines the software UART as debug so you’d actually need to so…

#define BLYNK_PRINT debugl;

As well as having debug.begin(9600); in your void setup.

However, I’d use debug_serial instead of debug if I were you.

Pete.