#include <stdio.h>
#include <string.h>
#include <stdint.h> // Add this line to include fixed-width integer types
int main() {
uint16_t raw = 1565;
double resistance = (((double)raw/4095.0) * 3.3)/0.1;
printf("thermistor value: %.2fu\r\n", resistance
);
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdHJpbmcuaD4KI2luY2x1ZGUgPHN0ZGludC5oPiAgLy8gQWRkIHRoaXMgbGluZSB0byBpbmNsdWRlIGZpeGVkLXdpZHRoIGludGVnZXIgdHlwZXMKCmludCBtYWluKCkgewogICAgdWludDE2X3QgcmF3ID0gMTU2NTsKICAgIGRvdWJsZSByZXNpc3RhbmNlID0gKCgoZG91YmxlKXJhdy80MDk1LjApICogMy4zKS8wLjE7CiAgICBwcmludGYoInRoZXJtaXN0b3IgdmFsdWU6ICUuMmZ1XHJcbiIsIHJlc2lzdGFuY2UpOwogICAgCiAgICByZXR1cm4gMDsKfQ==