UART serial between defined ports

sylarhero:
So that means I can connect the LED circuit to the 1 pin (which is tx) and the photodiode to the 0 pin (which is rx) ?

That will not interfere with the communication between the Leonardo and the PC.

However I do not believe it will be a useful test of anything. I assume you longer term plan is to use light to send data from the Leonardo to something else. The normal way that IR LEDs are used for data transmission is to modulate a 38kHz carrier wave - as in the link I gave you. By using a carrier frequency it is much easier for the system to ignore noise.

...R