Guest User

Untitled

a guest
Feb 19th, 2018
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. // Thermistor math to determine temperature
  2.  
  3. double Thermister(int RawADC) {
  4. double Temp;
  5. Temp = log(((10240000/RawADC) - 10000));
  6. Temp = 1 / (0.001129148 + (0.000234125 * Temp) + (0.0000000876741 * Temp * Temp * Temp));
  7. Temp = Temp - 273.15; // Convert Kelvin to Celcius
  8. return Temp;
  9. char buffer[32];
  10. sprintf(buffer, "%.2f", 123.45);
  11. //LcdWrite(buffer);
  12.  
  13. }
Add Comment
Please, Sign In to add comment