I just got my Fez Panda II with some sensors. One of them is the temperature sensor LM60.
The value i get is about 30 degrees celcius but i expecting a value about 17 degrees celcius(bases on an weatherstation).
You need to calibrate your own gain values. Take away the “- 424” in GetTemperatureInc() and measure the temp of ice water. That should give you the correct gain value for your sensor.
@ ianlee74: thats something i can do just adjusting the value untill i’ve got he right temperature.
But is that the right way?
@ Brett:
1: The sensor is connected on a breadboard to ground, 3.3V and analog4 (no resistor in use).
2: Yes, i’ve used my breath and a blow-dryer and the temperature change.
3: Yes, but this will give me the same values because if i make the calculations manually i use the same formula.
I had connected an light sensor(tept5700) on a3. When i disconnect this the temperature drops with 7 degrees celcius(Strange how is this possible?). Butt stil about 7 degrees celcius to high.
There’s another thread or seven about analog input and tieing all unused ports back to GND to improve reliability so you could try that. Remember that the Analog In on these devices are multiplexed, and this action might help make sure there’s no other influence from the unconnected mux pins.
Edit: if you check the spec sheet for the LM60, the 424mv output is meant to be 0 degrees C, and there is a 6.25mv/degree, so unless your specific device is out of spec I can’t see a specific code related issue, another reason to consider external factors like grounding of the other devices