Finished some rudimentary calibration code.  Need to figure out the interrupt-on-change interface stuff.