here is what i used...and a look at my connections
char val; // variable to receive data from the serial port
int ledpin = 13; // on-board LED
void setup() {
pinMode(ledpin, OUTPUT); // pin 13 (on-board LED) as OUTPUT
Serial.begin(9600); // start serial communication at 9600bps
}
void loop() {
if( Serial.available() ) // if data is available to read
{
val = Serial.read(); // read it and store it in 'val'
}
if( val == 'L' ) // if 'L' was received
{
digitalWrite(ledpin, LOW); // turn OFF the LED
} else {
digitalWrite(ledpin, HIGH); // otherwise turn it ON
}
delay(100); // wait 100ms for next reading
i was unable to figure out how to set the com port on the arduino ide serial terminal, so i used and external terminal program (tera term) and it worked with ease!