Arduino console not over Serial

Is there something to write to from Arduino program like console not connected with Serial? I am using Serial to communicate with computer but want to have seperate console for Arduino outputs for debugging&information. If I use Serial.println it is violating my serial communication.

Another serial port.
If you use UNO, there is only one serial port but there exists software serial library with some limitations. Some other boards have more serial ports, like Mega with 4.

EDIT: If you want to connect Arduino's IO for second port to the computer, the voltage level converter is needed (like RS232/serial TTL).

Budvar10:
Another serial port.
If you use UNO, there is only one serial port but there exists software serial library with some limitations.

For that, you’ll also need an FTDI cable.

Install an LCD to display debug info. Set up a software serial port and connect to the PC (another instance of serial monitor or a terminal program) with a TTL to USB converter.

Can use one of the various software serial libraries and an FTDI Basic or equivalent to provide USB connection to a PC.
That's why I like Atmega1284P chips, it has two hardware serial ports, it's easy to connect a FTDI Basic (clone, from tinyosshop.com) so I can have Serial1 to talk to 1 PC port while Serial talks to the main PC port. Then I can use Serial1 to fake an external device's comms with a terminal program during development.

I have UNO :confused: I don't want to add more hardware, rather achieve it using software, but I see it will be problem.

Perhaps write a PC program (maybe using Python) to take the place of the Serial Monitor and include in it code that can distinguish different types of messages from the Arduino and display them in different places. For example debug messages could be prefaced with the characters "dbg"

...R

Robin2:
Perhaps write a PC program (maybe using Python) to take the place of the Serial Monitor and include in it code that can distinguish different types of messages from the Arduino and display them in different places. For example debug messages could be prefaced with the characters "dbg"

...R

Ye I just thought about it but I don't know if it won't somehow affect primary communication.

Connecting an FTDI Basic is not adding much hardware, and will not impact the Serial interface you have going already.
You can get it as board that you connect 3 wires to (Rx, Tx, Gnd) and your own USB cable,
https://www.sparkfun.com/products/9716 or $6.90 at www.tinyosshop.com
or you can get it as a cable that you connect the 3 pins to
FTDI Cable 5V - DEV-09718 - SparkFun Electronics

saris111:
Ye I just thought about it but I don't know if it won't somehow affect primary communication.

I don't understand that. My concept is that the Python program will be the primary communication (as well as the secondary communication).

...R

@Robin2
I'm don't know Python, C is my area. I have a feeling what you mean but can you be so kind and show exact example?

There is nothing special about Python. if you are more familiar with C then use that.

I don't have a code example, but what I have in mind is that the PC program would listen for output from the Arduino. The normal output would be shown in one window on the screen and debug output would be shown in another window. As mentioned earlier, the debug messages can be prefaced by some special characters.

I have a Python program that controls a small lathe and the GUI is displayed as a web page. You can click a button to make a motor move and the Arduino sends back data to confirm the move is complete. The Arduino also sends debug messages and the Python program just displays them in the terminal window using the print function.

I should, of course, say that this would be a lot of trouble to take for a one-off project in which you only need a few lines of debug information for 30 minutes or so.

I am building another project at the moment and all the messages just display in the terminal window but the different types of messages are prefaced by different characters so I can distinguish them. But that is all I do and artistially it is just a mess - but sufficient for my needs. When it works I won't need any of it.

...R

Robin2:
The normal output would be shown in one window on the screen and debug output would be shown in another window. As mentioned earlier, the debug messages can be prefaced by some special characters.

Yes, I meant exactly this. I didn't know it is able with the Python. So the script is running in one terminal window and printing filtered output and it also opens another one where it is sending selected messages, isn't it?

Budvar10:
Yes, I meant exactly this. I didn't know it is able with the Python. So the script is running in one terminal window and printing filtered output and it also opens another one where it is sending selected messages, isn't it?

That is not what I am doing, and I don't know whether it is or is not possible.

My code displays the "official" output in a GUI (I am using a browser page for that) and shows the debug output in the terminal window from which I started the Python program.

I guess you could write the output for one of the activities (probably the debug output) to a file and have another program display the file in another terminal window. I think the Linux "tail" command does that.

...R

Thanks Robin, I'll try to investigate it.