    //read back from the ADC while simultaneously changing the config to start a oneshot read of internal temp)
    fastDigitalWrite(CS, LOW);
    adc_value=SPI.transfer16(ADS1118_SINGLE_SHOT_INTERNAL_TEMPERATURE);
+   myPID.Compute();
+   //TODO: update the PWM duty
    fastDigitalWrite(CS, HIGH);
   }
   //every other interrupt will be a rising edge, we need to keep track of which is which

  Serial.println(ADS1118_INT_TEMP_C(0x3B00<<2));
  delay(5000);
  */

};
//EEMEM tells the compiler that the object resides in the EEPROM
NVOL nvol EEMEM; 

//Hard-coded calibration points.  TODO: make these not hard-coded
#define NUM_CAL_POINTS 4
//uint16_t microvolts [NUM_CAL_POINTS] = {0,10,20,30,40,50};
uint16_t adc_reading [NUM_CAL_POINTS] = {283,584,919,1098}; 
uint16_t deg_c [NUM_CAL_POINTS] = {105,200,300,345};

//x = multiMap2(raw, adc_reading, deg_c, NUM_CAL_POINTS);

//Volatile Variables used by the interrupt handlers
volatile int16_t adc_value=0;          //ADC value read by ADS1118
