How to set up Arduino Uno to receive inputs from a computer?

I am working on trying to get a robotic arm to move in relation to brainwave signals, and have a program that can output keystrokes when brainwave patterns are recognized, but I am not sure how to send this signal to the Uno itself. I thought I could send the signals through the USB cable, but I can't really find documentation on how to do that. If I were to get certain shields, would that make it easier to send signals from the computer to the Uno, or am I just missing something basic? Any help would be much appreciated.

Connect Uno via serial cable to the PC.

Have sketch check for PC output, act on what's received:

void loop(){
if (Serial.avaliable()>0){
  keystroke = Serial.read();
  }
// do something based on keystroke recieved
}

This is simplest, you might want to look for something longer, or for certain variables, or send a message back, etc.
Can't help you on the PC side.

Your PC can communicate to the board anytime using a Serial connection via the USB cable.

There is a lot of great documentation under the "4. Communication" header on this page: http://arduino.cc/en/Tutorial/HomePage

For example, http://arduino.cc/en/Tutorial/ReadASCIIString

You can use any language you want to make the Serial connection, from Processing to C++ to Python.

Or you could use this Serial messaging library for C# CmdMessenger 3 - serial library for Arduino and .NET/Mono, with charting example - Interfacing w/ Software on the Computer - Arduino Forum. C# is a very easy and powerful language.

Disclaimer: I wrote the library, so I might be biased :stuck_out_tongue: