A small problem with serial flashing of LED - SOLVED

Hello,

I am sending a signal from one Arduino with and XBee to another Arduino with an XBee. All I want it to do at this point is, when a pin is brought LOW, flash an LED. I have the XBees communicating just fine, there is just a small problem with my code.
'H' is sent when the pin is brought to low, but 'L' just keeps being sent all the time.

I'm sure it's something easy, I just haven't been able to find it.

All help is very gratefully accepted :blush:

/*When base station triggers, blinks LED on other board
*/

int SENSOR_PIN = 2;   // base station trigger

void setup()
{
        Serial.begin(9600); // opens serial port, sets data rate to 9600 bps
        pinMode(SENSOR_PIN, INPUT);
        digitalWrite(SENSOR_PIN, HIGH); //turn on internal pullup resistor so the open input state is HIGH.
}

void loop()
{
        if(digitalRead(SENSOR_PIN) == LOW) // pin was triggered
        Serial.print('H'); // turn on LED
        delay(1000);
        Serial.print('L'); // turn off LED
        delay(1000);
}

Hi,

Problem solved. Missing a couple of { } in the void loop section. Newbie mistake for sure. :blush:

void loop()
{
        if(digitalRead(SENSOR_PIN) == LOW){ // pin was triggered
        Serial.print('H'); // turn on LED
        delay(1000);
        Serial.print('L'); // turn off LED
        delay(1000);
}
}