Debugging with a serial connection

I’m using the USB board. Using pins 1 and 2 for a serial connection that connects with a device and sends back a number via Rx serial. That number is set to a particular variable. Is it possible in debugging to see what that number is on the computer screen, in the arduino interface.

I’m just unsure of how the debugging really works when using a serial connection. What i read it seems like if you’re using a serial device you can’t use debugging to view something in the interface?

Also this is just for testing in to make sure everything is working correctly, it won’t be in the final code.

Thanks

Any data you send over the serial connection (e.g. using Serial.print()) will go out both over the TX pin (pin 1) and over the USB connection to the computer. If you don’t need to talk to the other device, you can simply not connect the TX pin to anything and just send data to the computer. Any data that comes in from the USB connection or the RX pin (pin 0) will be available with Serial.read(). So you could just connect the RX pin to the device and then read data from it with Serial.read() and send it to the computer with Serial.print(). If you need to both write to and read from the device, you might need to use a software serial connection; see the SoftwareSerial library: http://www.arduino.cc/en/Reference/SoftwareSerial