 
   currentState = S_WARMING_UP;
   buttonThen = 0;
+  sensorThen = 0;
 }
 
 

unsigned long now = 0;

int buttonThen;
boolean wasHigh = false;

///SETUP//////////////////////////////////////////////////////////////////

    digitalWrite(RED_LED_PIN, HIGH);
    digitalWrite(GREEN_LED_PIN, LOW);

    //If there's a rising edge on the sensor pin
    if (sensorRising)
    {
      Serial.println("Movement!");
      currentState = S_ACTIVE; 
