 /*
-  Button
+  Push a button and send a string over serial.
 
- Turns on and off a light emitting diode(LED) connected to digital
- pin 13, when pressing a pushbutton attached to pin 2.
+  Buttons are on pins 2 and 4.
+  LEDS are on pin 9 and pin 10.
+*/
 
 
- The circuit:
- * LED attached from pin 13 to ground
- * pushbutton attached to pin 2 from +5V
- * 10K resistor attached to pin 2 from ground
+// set variables for button 1
+const int buttonPin = 2;
+const int ledPin =  9;
+int buttonState = 0;
+int buttonDown = 0;
 
- * Note: on most Arduinos there is already an LED on the board
- attached to pin 13.
-
-
- created 2005
- by DojoDave <http://www.0j0.org>
- modified 30 Aug 2011
- by Tom Igoe
-
- This example code is in the public domain.
-
- http://www.arduino.cc/en/Tutorial/Button
- */
-
-// constants won't change. They're used here to
-// set pin numbers:
-const int buttonPin = 2;     // the number of the pushbutton pin
-const int ledPin =  9;      // the number of the LED pin
-
+//set variables for button 2
 const int buttonPin2 = 4;
 const int ledPin2 = 10;
-
-// variables will change:
-int buttonState = 0;         // variable for reading the pushbutton status
 int buttonState2 = 0;
-
-int buttonDown = 0;
 int buttonDown2 = 0;
 
-String inputString = "";         // a string to hold incoming data
-boolean stringComplete = false;  // whether the string is complete
 
 void setup() {
   // initialize the LED pin as an output:


  Serial.begin(9600);

  // reserve 200 bytes for the inputString:
  inputString.reserve(200);
}
/*



*/
void loop() {
  // Read the state of button 1 and if it hasn't been detected as pushed, trigger one Serial.print for Button^1
  buttonState = digitalRead(buttonPin);
  
  if (buttonState == HIGH) {
    if(buttonDown == 0){
      buttonDown = 1;
      Serial.print("Button^1\n");
      digitalWrite(ledPin, HIGH);
    }
  } else {
    if(buttonDown == 1){
      buttonDown = 0;
      digitalWrite(ledPin, LOW);
    }
  }


  // Read the state of button 2 and if it hasn't been detected as pushed, trigger one Serial.print for Button^2
  buttonState2 = digitalRead(buttonPin2);
  
  if (buttonState2 == HIGH) {
    if(buttonDown2 == 0){
      buttonDown2 = 1;
      Serial.print("Button^2\n");
      digitalWrite(ledPin2, HIGH); 
    }
  } else {
    if(buttonDown2 == 1){
      buttonDown2 = 0;
      digitalWrite(ledPin2, LOW);
    }
  }
}

