   transmitTemps(2);
 }
 
+void stabilizeAdc(void)
+{
+  if (_pinBattery != 0xff)
+  {
+    unsigned int last;
+    unsigned int curr = analogRead(_pinBattery);
+    unsigned int cnt = 0;
+    // Reads the adc a bunch of times until the value settles
+    // Usually you hear "discard the first few ADC readings after sleep"
+    // but this seems a bit more scientific
+    do {
+      ++cnt;
+      last = curr;
+      curr = analogRead(_pinBattery);
+    } while ((cnt < 10) && (abs(last - curr) > 2));
+  }
+}
+
 void loop(void)
 {
   sleepSeconds(_sleepInterval);
+  stabilizeAdc();
   checkTemps();
 }
 

    digitalWrite(_pinProbeSupplyBase + pin, HIGH);
  }
  // takes about 15uS to stabilize and the enabling process takes 6us per pin at 16MHz
  delayMicroseconds(10);  
}

void checkTemps(void)

  
    // HDR=0 means to broadcast, no ACK requested
    rf12_sendStart(0, outbuf, len);
    rf12_sendWait(0);
  }  /* while txCount */ 
  
  rf12_sleep(RF12_SLEEP);
