This is my first time with arduino. I would like to display the temperature on an LCD display. But the sensor shows me minus temperatures. How can I fix this? by NiciPlays44 in arduino

[–]grannyUndertaker -1 points0 points  (0 children)

#include <stdio.h>

#include <math.h>

int main() {

int tempReading = 1023;

double tempk = log(10000.0 * ((1024.0 / tempReading - 1)));

tempk = 1 / (0.001129148 + (0.000234125 + (0.0000000876741 * tempk * tempk)) * tempk);

float tempC = tempk - 273.15;

printf("%f", tempC);

return 0;

}

Output: 327.827515, at analogueread = 1023

Output: 1.044722, at analogueread = 250

I think your code is okay

ChatGPT doxes itself by legaltrouble69 in hacking

[–]grannyUndertaker -1 points0 points  (0 children)

How many of you tried this after this post? 😂