Created
November 13, 2020 15:28
-
-
Save dedeweb/99735e69d4bb2a67ca25efe3041f003e to your computer and use it in GitHub Desktop.
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
import 'dart:math'; | |
void main() { | |
var adcRaw = 3120; | |
var rawValue = (adcRaw * 3.2) / 4096; | |
var rT = (3.2 * 60400) / (3.2 - rawValue) - 60400; | |
var tempKelv = 4250 * 298 / (4250 + 298 * (log(rT / 1000) - log(100))); | |
var degC = tempKelv - 273.15; //to deg celciuss | |
var correctDegC = (degC -2.2007)/0.907; | |
print(correctDegC); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment