#define LED 11
char ch;
void setup()
{
Serial.begin(9600);
pinMode(LED, OUTPUT);
Serial.println("Press O or C:");
}
void loop()
{
if (Serial.available())
{
ch = Serial.read();
if (ch=='O')
digitalWrite(LED,1);
if (ch='C')
digitalWrite(LED,0);
}
}