int incomingByte = 0; // for incoming serial data void setup() { Serial.begin(115200); //set the serial connection to be very fast. 115200 bits per second! pinMode(12,OUTPUT); //pin 12 is an output } void loop() { //check to see if there are any bytes waiting in the buffer? //You will receive serial data if the arduino is plugged into USB and the Serial Monitor is open if (Serial.available() > 0) //If there is something waiting to be read: READ IT! { // read the incoming byte: incomingByte = Serial.read(); // say what you got: Serial.print("I received: "); Serial.println(char(incomingByte)); //Check to see if the incoming byte is the same as an 'A'. Check the ascii table to know which character you're looking for. if (incomingByte == 65) digitalWrite(12,HIGH); //If the letter is an 'A', turn ON pin 12. else digitalWrite(12,LOW); //If not, turn OFF pin 12. //Note the shorthand way of writing an 'if' statement. This only works if there is 1 command to happen after the if or the else statements. //To view the ascii table: } }