Thanks for the wiring and setup!
The thing that puzzles me though, is that firstly, the 0.5 offset voltage of the TMP36 appears to have been applied to the reading.
- Code: Select all
mVolts = xb.analog_samples # Report the millivolts from the TMP36
If subtracting 500 here as one would expect, one would get a negative value for normal temperatures.
This seems very strange to me atleast, there is no way of the Xbee knowing this as I see it. Also, when reading 742 mV reading from my multimeter (Caltek CM2701), getting an Xbee analog reading of 229 is actually not what I expect. If you calculate using the two methods, you actually get different results as well:
Multimeter: 742 mV = 24.2 C (minus 500 mV offset)
XBee: 0x005e = 229 = 22.9 C (not subtracting anything here)
So I'm a bit confused here, how can the AD reading represent the TMP36 mV out reading?
Another thing is that compared to a reference thermometer the difference is 2 degrees C. Not sure which is wrong :/