Arduino seems unresponsive

I was trying to use buttons to turn on and off an LED on my Arduino, but nothing was working. I set it up so that when there is no power being supplied to port 2, an LED will turn on. It's a very simple project, and I actually downloaded it from, so I am sure the project is correct. I decided to test it by completely unplugging port 2. When I unplug it, the light stays off for about 4 seconds. (By the way, the whole time it is running, the TX light is blinking on and off - is that bad?) After the 4 seconds, the LED light begins to blink, in time with the TX light. It blinks five times, staying lit on the fifth. The AREF light blinks in time with the LED.

I am a newbie. What is going on?

Edit: I ran it again after unplugging it, and this time the TX light stays on solid the whole time, but the same thing happens with the flashing LED.

const int button1Pin = 2; // pushbutton 1 pin
const int button2Pin = 3; // pushbutton 2 pin
const int ledPin = 13; // LED pin
int x = 0;

void setup()
// Set up the pushbutton pins to be an input:
pinMode(button1Pin, INPUT);
pinMode(button2Pin, INPUT);

// Set up the LED pin to be an output:
pinMode(ledPin, OUTPUT);

void loop()
int button1State, button2State; // variables to hold the pushbutton states

button1State = digitalRead(button1Pin);
button2State = digitalRead(button2Pin);
if (x%10000 ==0) {
x = 0;
if (button1State == LOW) {
Serial.println("Button 1 is LOW!");
else Serial.println("Button 1 is HIGH!");
if (button2State == LOW) {
Serial.println("Button 2 is LOW!");
else Serial.println("Button 2 is HIGH!");

if (((button1State == LOW) || (button2State == LOW)) // if we're pushing button 1 OR button 2
&& ! // AND we're NOT
((button1State == LOW) && (button2State == LOW))) // pushing button 1 AND button 2
// then...
digitalWrite(ledPin, HIGH); // turn the LED on
digitalWrite(ledPin, LOW); // turn the LED off

I ran it again

What is "it" ?

What is "it" ?

By 'it' I mean I uploaded the program to the Arduino again.

You are sending LOTS of output to the Serial port. Possibly hundreds of messages per second. When the output buffer fills up the attempt to put more text in the output buffer will wait until some of the older data has been sent. This will slow down your sketch and make it less responsive.

To avoid flooding the output buffer you might want to report the button state only when it changes.

     int button1State, button2State;  // variables to hold the pushbutton states[color=#222222][/color]
     static int prevButton1State=HIGH, prevButton2State = HIGH;

     if (button1State != prevButton1State) {
     Serial.println(button1State ? "Button 1 is HIGH!" : "Button 1 is LOW!");
    prevButton1State = button1State;
 // and likewise for button2State