 #define GAME_OVER_TRANSITION 1000 //duration of game over animation (ms)
 #define SLEEP_TRANSITION 2000 //duration of animation to sleep (ms)
 
+void LEDS_ON(int count, int record){
+    for (int i = NUM_LEDS; i >=0; i--) {
+      if (i<=NUM_LEDS-count){leds[i]=CRGB::Black;}
+      //else {leds[i]=CRGB::Green;}
+      else {leds[i]=CHSV(gHue, 255, 255);}
+      if (i==NUM_LEDS-record){leds[i]=CRGB::Red;}
+    }
+
+  // send the 'leds' array out to the actual LED strip
+  FastLED.show();  
+  // insert a delay to keep the framerate modest
+  FastLED.delay(1000/FRAMES_PER_SECOND);       
+  // do some periodic updates
+  EVERY_N_MILLISECONDS( 20 ) { gHue++; } // slowly cycle the "base color" through the rainbow
+}
+
 void LED(String pattern){
   if (pattern=="going_to_sleep"){
     digitalWrite(MOSFET_GATE,HIGH);

#define FRAMES_PER_SECOND  120
#define ARRAY_SIZE(A) (sizeof(A) / sizeof((A)[0]))
#define SET_IDLE_MILLISECONDS 20000 // how many seconds at idle before moving to sleep?

// Variables used in CheckAccel() routine
MPU6050 accelgyro;

int a_forward_offset=0,a_sideway_offset=0,a_vertical_offset=0;


unsigned long start_time=0, current_time=0, elapsed_time=0, record_time=0, previous_record_time=0;
int i=0;

CRGB leds[NUM_LEDS];  // Define the array of leds
