 // Pin 13 has the LED on Teensy 3.0
 // give it a name:
 #define STATUS_LED 13
+
+// Pin A9 is audio in
+#define AUDIO_PIN A9
+
 int frame_count = 0;
+
+ADC *adc = new ADC();
+
+short adc0_count = 0;
+short adc0_min = 0;
+short adc0_max = 0;
+long adc0_total = 0;
+
+void adc0_isr(void) {
+    int v = adc->analogReadContinuous(ADC_0);
+    if (adc0_count <= 0) {
+        adc0_count = 0;
+        adc0_min = v;
+        adc0_max = v;
+        adc0_total = v;
+    } else {
+        adc0_min = min(adc0_min, v);
+        adc0_max = max(adc0_max, v);
+        adc0_total += v;
+    }
+    adc0_count++;
+}
 
 void setup() {
   pinMode(STATUS_LED, OUTPUT);
-  digitalWrite(STATUS_LED, HIGH);
+  digitalWriteFast(STATUS_LED, HIGH);
 
   Serial.begin(115200);
   FastLED.addLeds<OCTOWS2811>(leds, NUM_LEDS_STRIP_A);

  FastLED.show();

  delay(500);
  digitalWrite(STATUS_LED, LOW);

  // Now turn the LED off, then pause
  leds[0] = CRGB::Black;

  FastLED.show();
  delay(500);

  pinMode(AUDIO_PIN, INPUT);

  adc->setAveraging(32); // set number of averages
  adc->setResolution(12); // set bits of resolution
  adc->setConversionSpeed(ADC_LOW_SPEED); // change the conversion speed
  adc->setSamplingSpeed(ADC_LOW_SPEED); // change the sampling speed
  adc->enableInterrupts(ADC_0);
  adc->startContinuous(AUDIO_PIN, ADC_0);

  digitalWriteFast(STATUS_LED, HIGH);
}

long leds_mw_per_supply() {
