 uint8_t adc_pins[] = {A0,A1,A2,A3,A4,A5,A6,A7,A8, A9, A10,
                       A11,A12,A13,A14,A15,A16,A17,A18,A19,A20,A21,A22,A23,A24};
 uint8_t adc_pins_diff[] = {A10, A11};
+
+#elif defined(ADC_TEENSY_4)  // Teensy 4
+#define PINS 14
+#define DIG_PINS 10
+#define PINS_DIFF 0
+uint8_t adc_pins[] = {A0,A1,A2,A3,A4,A5,A6,A7,A8, A9, A10, A11,A12,A13};
+uint8_t adc_pins_dig[] = {A0,A1,A2,A3,A4,A5,A6,A7,A8, A9};
+uint8_t adc_pins_diff[] = {};
 #endif // defined
 
 void setup() {

        }
    }
    Serial.println();
    Serial.print("Differential pairs: ");
    for (int i=0;i<PINS_DIFF;i+=2) {
        value = adc->analogReadDifferential(adc_pins_diff[i], adc_pins_diff[i+1]); // read a new value, will return ADC_ERROR_VALUE if the comparison is false.

        Serial.print(". ");
    }
    Serial.println();
    #endif
    // the actual parameters for the temperature sensor depend on the board type and
    // on the actual batch. The printed value is only an approximation
    //Serial.print("Temperature sensor (approx.): ");
    //value = adc->analogRead(ADC_INTERNAL_SOURCE::TEMP_SENSOR); // read a new value, will return ADC_ERROR_VALUE if the comparison is false.
    //Serial.print(": ");
    //float volts = value*3.3/adc->getMaxValue(ADC_0);
    //Serial.print(25-(volts-0.72)/1.7*1000, 2); // slope is 1.6 for T3.0
    //Serial.println(" C.");


    // Print errors, if any.
