tested with adafruit max31855 and made some changes for it

including the reduction of the median array to 10 if using the adafruit
sensor