Hey Everybody...."Norm!" Sorry showing my age..
Anyway I'm having trouble with my wireless temp. monitor using the Xbee and TMP36. I'm using a modified code from theTweet-A-Watt (thanks again) and Adafruit's xbee adapter. I have the TMP36 hooked up with the analog out to AD0 on the adapter, GND to GND, and V+ pin to VCC and VREF (3.3v) on the adapter. I am getting readings just fine every two seconds, however they fluctuate as much as 10 degrees F or more on each cycle.
Could this be an interference problem or even power supply. My 3.3V on VREF holds very solid while transmitting. Stumped and could use some expert advise. Thanks.
- Code: Select all
mVolts = xb.analog_samples[0][0] # Report the millivolts from the TMP36
voltage = mVolts * 3.3 / 1024
tempC = (voltage - .5) * 100
tempF = math.floor(tempC * 9 / 5 + 32)