Real-time control with the PC interface

For (serial) communication, do a search for Robin2's serial input basics thread. The thread can give you ideas.

The principles can be applied to serial communication, communication via wired network or via wifi and so on.