 
 void loop(void)
 {
+	static units_t units = cent;
+	static bool sleeping = false; 
 	static uint8_t buf[8], *p = buf;
 	static double curr_temp = 0.0;
 	static uint32_t last;

const double tzero = 25 + zeroC;

typedef enum { cent, fahr, abso } units_t;
units_t units = cent;
boolean sleeping = false; 

#define IDLE		10000L
#define DIGIT		500L
#define DEBOUNCE	250L

Analog thermistor(THERMISTOR, vcc);
PinChangeGroup pins(PB);


#include <Interrupted.h>

// thermistor parameters
const double r0 = 10000;
const double beta = 3977.0;
