Skip to content

Instantly share code, notes, and snippets.

@brianw
Created March 18, 2012 21:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brianw/2081667 to your computer and use it in GitHub Desktop.
Save brianw/2081667 to your computer and use it in GitHub Desktop.
ADC to temp
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