Created
October 26, 2020 11:25
-
-
Save ByK95/2a584e5ca45f16f1337eaec4aa5b6b99 to your computer and use it in GitHub Desktop.
Revisions
-
ByK95 created this gist
Oct 26, 2020 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,25 @@ /* Arduino 10k resistive termometer reading example Circuit: 10k pullup */ void setup() { Serial.begin(9600); } double Thermister(int RawADC) { double Temp; Temp = log(((10240000/RawADC) - 10000)); Temp = 1 / (0.001129148 + (0.000234125 + (0.0000000876741 * Temp * Temp ))* Temp ); Temp = Temp - 273.15; return Temp; } void loop() { int val; double temp; val=analogRead(0); temp=Thermister(val); Serial.println(temp); delay(1000); }