Go Down

Topic: Debug Output From (Can't use Serial.print) (Read 1 time) previous topic - next topic

johnr

I am interfacing my Arduino based device with a closed sourced Windows program.  The Windows program will communicate with the Arduino over USB.

As I get up to speed with the Arduino app parsing and processing data it receives, it would help if I can display debug statements generated by the Arduino program.  I can't use the serial console in the IDE as the program I am interfacing with has exclusive access to the USB port.

What methods are easily available to have the Arduino program output available?  It does not need to be real time.  I have an Arduino Mega.

Thanks,

John

BenF

I have used software from the project linked to below during similar development projects and it works great.

http://com0com.sourceforge.net/

retrolefty

Well the fact that you have a Mega board that has 4 hardware serial ports, an easy method would be to purchace a USB serial module and wire it to one of the Mega's additional serial ports. You can then use a PC serial terminal program (hyper terminal, etc) to monitor your debug commands that you imbed into your sketch.

Here is one example:

http://www.sparkfun.com/commerce/product_info.php?products_id=9115

Lefty

johnr

Thanks...between those options I can work through it.

CaptainObvious

You could always use a MAX232 or compatible, and you don't even need to take up your hardware serial, you can just use NewSoftSerial and use Serial.print that way.

I made an arduino board based off the max232 (much easier to solder :D) and I used the extra set of pins on the max232 for a NewSoftSerial RS232 version. So I can talk to RS232 devices via any pin! :D

BRuTuS

#5
Nov 16, 2009, 03:35 am Last Edit: Nov 16, 2009, 03:36 am by brutus1975 Reason: 1
Cheat!

Use a serial lcd and connect it in parallel with the Pins.

It will then display anything sent to that port.  Just make sure your debug statements include a \n to jump down to the next line on the LCD.

BenF

Quote
Use a serial lcd and connect it in parallel with the Pins.

If data sent to the PC application is binary, you will not be able to display/view the data on the LCD. The binary data may even reconfigure your display (switch it off, change baudrate, enable blinking, change backlight etc.).  Even with ASCII only (e.g. GPS data) it is not practical because the volume of data is likely to overflow the LCD display quickly.
Quote
Just make sure your debug statements include a \n to jump down to the next line on the LCD.

Anything you add to the serial stream will also reach the PC application and may upset whatever protocol you're implementing.

retrolefty

#7
Nov 16, 2009, 08:11 am Last Edit: Nov 16, 2009, 08:13 am by retrolefty Reason: 1
Quote
Anything you add to the serial stream will also reach the PC application and may upset whatever protocol you're implementing.


Correct, for debug statements to make sense for troubleshooting a application talking to a PC, then it needs to stream to a different serial port, hardware or software.

Lefty


Go Up