             Serial.println("Timer1 setup failed");
     }
 
-    if(!buffer0->isEmpty()) { // read the values in the buffer
-        Serial.print("Read pin 0: ");
-        Serial.println(buffer0->read()*3.3/adc->adc0->getMaxValue());
-        //Serial.println("New value!");
-    }
-    if(!buffer1->isEmpty()) { // read the values in the buffer
-        Serial.print("Read pin 1: ");
-        Serial.println(buffer1->read()*3.3/adc->adc0->getMaxValue());
-        //Serial.println("New value!");
-    }
+    // See if we have a timed read test that finished.
+    if (delta_time_0) printTimedADCInfo(ADC_0, buffer_0, delta_time_0);
+    if (delta_time_1) printTimedADCInfo(ADC_0, buffer_1, delta_time_1);
 
     if (Serial.available()) {
         c = Serial.read();

    delayMicroseconds(readPeriod);
}

// This function will be called with the desired frequency
// start the measurement
// in my low-res oscilloscope this function seems to take 1.5-2 us.


    //digitalWriteFast(ledPin+2, !digitalReadFast(ledPin+2));

    #if defined(__IMXRT1062__)  // Teensy 4.0
        asm("DSB");
    #endif

}