 
 void hug()
 {
-  // Bring arms in together.
-  uint16_t pulselen_right = RIGHT_ARM_OPEN;
-  for (uint16_t pulselen_left = LEFT_ARM_OPEN; pulselen_left < LEFT_ARM_CLOSED && pulselen_right > RIGHT_ARM_CLOSED; pulselen_left++) {
-    pwm.setPWM(left_arm, 0, pulselen_left);
-    pwm.setPWM(right_arm, 0, pulselen_right);
-    pulselen_right--;
-    delay(1);
-  }
+  pwm.setPWM(left_arm, 0, LEFT_ARM_CLOSED);
+  pwm.setPWM(right_arm, 0, RIGHT_ARM_CLOSED);
   delay(1000);
-  
-  // Release arms.
-  uint16_t pulselen_left = LEFT_ARM_CLOSED;
-  for (uint16_t pulselen_right = RIGHT_ARM_CLOSED; pulselen_right < RIGHT_ARM_OPEN && pulselen_left > LEFT_ARM_OPEN; pulselen_right++) {
-    pwm.setPWM(right_arm, 0, pulselen_right);
-    pwm.setPWM(left_arm, 0, pulselen_left);
-    pulselen_left--;
-    delay(1);
-  }
-  delay(1000);
+  pwm.setPWM(right_arm, 0, RIGHT_ARM_OPEN);
+  pwm.setPWM(left_arm, 0, LEFT_ARM_OPEN);
+  delay(500);
 }

#define MICRO_SERVO_MIN 160
#define MICRO_SERVO_MAX 584

#define LEFT_ARM_OPEN    266
#define LEFT_ARM_CLOSED  372
#define RIGHT_ARM_CLOSED 372
#define RIGHT_ARM_OPEN   478

#define LEFT_EAR_BACK 475
#define LEFT_EAR_FORWARD 265

uint8_t left_ear = 2;
uint8_t right_ear = 3;

int hug_flag = 0;
int kissed_flag = 0;
int test_flag = 0;

int normal_light_flag = 0;

int photocellPin = 0;     // the cell and 10K pulldown are connected to a0
int photocellReading;     // the analog reading from the sensor divider
int LEDpin = 11;          // connect Red LED to pin 11 (PWM pin)
int LEDbrightness;

int speakerPin = 12;
int numTones = 10;
int tones[] = {261, 277, 294, 311, 330, 349, 370, 392, 415, 440};
//            mid C  C#   D    D#   E    F    F#   G    G#   A

void setup()
{
