Created
March 18, 2012 21:33
-
-
Save brianw/2081667 to your computer and use it in GitHub Desktop.
ADC to temp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def adc_voltage_to_ohms(adc_value): | |
v = (adc_value * 5.0)/4096.0 | |
return -1000/((0.0174*v) - 0.925411808) -1000 | |
def ohms_to_celcius(ohms): | |
return (ohms - 100) * (138.4 / 100.0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment