How to detect if the board is connected to PC?

Yes it is.