 #include <Math.h>
 #include <Wire.h>
+#include <prometheus.h>
 
 #define SDAPIN 13
 #define SCLPIN 12
+
+#define SERVER_IP           "10.1.20.200"
+#define SERVER_PORT         9091
 
 // TODO(z2amiller):  Set up interrupts to call back when the temperature
 //                   on one of the pins gets too hot.  Needs to be added to

  }
}


// TODO(z2amiller):  Have the TI128D818 library only return the raw
//                   temperature value, this temperature conversion
//                   is very application specific.
float TI128D818::temp(const uint8_t channel) {
  uint16_t t = read16(channel);
  // This is a 12 bit ADC; bit shift this 16 bit value to get the
  // 12 bits we are interested in.
  t >>= 4;
  // Calculate the actual temperature using the Steinhart-Hart
  // formula.
  const int measured_resistance = 10000.0 * ((4096.0 / t) - 1); 
  const float mr_log = log(measured_resistance / 10000.0);
  // Steinhart-hart coefficients for the Vishay NTCLG100E2103.
  // (10K @ 25C thermistor)
  const float tempK = 1 / (0.003354016 +
                          (0.0002569850 * mr_log) +
                          (0.000002620131 * pow(mr_log, 2)) +
                          (0.00000006383091 * pow(mr_log, 3)));
  return tempK - 273.15; // tempC
}

// TODO(z2amiller):  Provide a configuration class that encapsulates
//                   all of the ADC configuration options.
//                   (pins, modes, etc).
bool TI128D818::init(const uint8_t adc_mode) {
  Wire.begin(SDAPIN, SCLPIN);
  write8(0x00, 0x00); // disable all.
  pollUntilReady();

}

// TODO(z2amiller):  Have a maximum allowed elapsed time?
void TI128D818::pollUntilReady() {
  int delay_time = 33;
  while (true) {
