 int rangeStatus;
 volatile int recordNo;
 volatile boolean dorecored;
+//unsigned long startmilis;
+//unsigned long stopmilis;
+unsigned long loopcount;
 
 void record() {
   recordNo++;


void loop() {
  if (dorecored == true) {
    digitalWrite(ledPin, HIGH);
    int microStatus = digitalRead(microPin);
    int nanoStatus  = digitalRead(nanoPin);

void setup() {
  delay(20);
  adc_disable();
  pinMode(doRecordPin, INPUT);
  pinMode(microPin, INPUT_PULLUP);
  pinMode(nanoPin, INPUT_PULLUP);
