Skip to content

brianberlin/steinhart_hart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SteinhartHart

SteinhartHart allows easy coefficient and temperature calculations

Code adapted from: https://www.npmjs.com/package/steinhart-hart

Example Usage

# celsius = -25 (248.15 in Kelvin) ---- resistance = 87041
# celsius = 0 (273.15 in Kelvin) ---- resistance = 27326
# celsius = 25 (298.15 in Kelvin) ---- resistance = 10000
iex(1)> coefficients = SteinhartHart.calculate_coefficients({87041, 27326, 10000}, {248.15, 273.15, 298.15})
{8.975539782833824e-4, 2.501791479471131e-4, 1.948344036705597e-7}
iex(2)> SteinhartHart.get_temperature_at_resistance(7000, coefficients)
307.90314140561975

Installation

def deps do
  [
    {:steinhart_hart, github: "brianberlin/steinhart_hart"}
  ]
end

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages