Blog

Posted 2007/02/27

Reading temperature from a mts310 sensor board

I could not get our mts310 sensor boards to give me a temperature reading, they always returned 0. After understanding how the driver and the hardware interact (and lots of googling) I found the answer which I’ve noted here to help others.

The temperature sensor uses a different power control line than is in the Tiny OS source code I had. The fix is to alter one file:


tos/sensorboards/mts310/sensorboard.h

The fix:


// old line:
// TOSH_ALIAS_PIN(TEMP_CTL, INT2);
// fix:
TOSH_ALIAS_PIN(TEMP_CTL, PW0);