     starttime = 0;
     endtime = 0;
     elapsed_time = 0;
-    
+
     ClearLine(0);
-    DisplayText(0, 0, "Ready");
-    Serial.print("Ready\n");
-    
+    DisplayText(0, 0, "Ready           ");
+    Serial.println("Ready");
+
+    // blinkdisplay
+    BlinkDisplay(500);
+
     while (!started) {
-      started = sensor_tripped(START_SENSOR, SENSOR_LOW, SENSOR_HIGH);
+      started = sensor_tripped(START_SENSOR, SENSOR_LOW, sensor_high_start);
     }
     starttime = millis();
     Serial.print("sense start at ");

#define END_SENSOR A1
#define START_SENSOR A2
#define SENSOR_LOW 0
#define SENSOR_HIGH 250

LiquidCrystal lcd(8, 9, 4, 5, 6, 7);
int LastKeyPressed = -1;
bool DebugMode = false;

void setup() {
  lcd.begin(16, 2);
  lcd.clear();
  pinMode(START_SENSOR, INPUT);
  pinMode(END_SENSOR, INPUT);
  Serial.begin(9600);      // open the serial port at 9600 bps:   
}

int sensor_tripped(int sensor_id, int low_value, int high_value) {

    return true;
  }
  return false;
}

int guess_ambient_light(int sensor_id) {
  unsigned long sensor_data = 0;
  for(int i=0;i<SENSOR_SAMPLES;i++) {
    sensor_data += analogRead(sensor_id);
  }
  return int(sensor_data / SENSOR_SAMPLES);
}

void loop() {
