         delay(100);
         digitalWrite(RED_PIN, LOW);
         delay(100);      
-    } 
+    }
+    
+    digitalWrite(POWER_SWITCH_PIN, LOW);
   }
 
   enterSleep();

        delay(100);      
      }  
    }
    delay(1000*SECONDS_ON-1000);
    
    for (int i=0; i<5; i++) {

      }
    } else {
      // Not much voltage left, flash green pin 1s.
      digitalWrite(POWER_SWITCH_PIN, HIGH);
      digitalWrite(RED_PIN, LOW);
      for (int i=0; i<5; i++) {
        digitalWrite(GREEN_PIN, HIGH);
