     noTone(speakerPin);
     normal_light_flag = 0;
   }
-  
-  if ( photocellReading > 950 && normal_light_flag ) //it is bright
+
+  if ( photocellReading > 950 && normal_light_flag ) // it is bright
   {
     tone(speakerPin, tones[9]); //play A
     delay(500);
     noTone(speakerPin);
     normal_light_flag = 0;
+  }
+  
+  // read the state of the pushbutton value:
+  buttonState = digitalRead(buttonPin);
+  
+  // check if the pushbutton is pressed.
+  // if it is, the buttonState is HIGH:
+  if ( buttonState == HIGH )
+  {
+    digitalWrite(ledPin, HIGH);
+    hug();
+    reset_arms();
+  }
+  else
+  {
+    digitalWrite(ledPin, LOW);
   }
   
   // check if manually moved

  pwm.setPWM(left_arm, 0, LEFT_ARM_OPEN);
  delay(500);
}

#include <Wire.h>
#include <Adafruit_PWMServoDriver.h>

