arduino serial library
Maybe this is simplistic, but if you open the serial port on the computer, doesn't that make Serial.available() == 0?

You could light the LED on the board if that's true. Hope this helps.