That's kind of missing the point, isn't? Buying an expensive temperature sensor just to lower the accuracy with a wrong resistor?
I'm trying to rewrite the MAX38165 module in the firmware based on the example I linked above, but to be perfectly honest I have no idea what I'm doing. My C++ knowledge ends on simple console games and I have zero experience coding for ARM. What I'm having trouble with is getting the ohm reading. In the GetTemperature method you have an adcVal variable. How do I convert this value to ohms? What I tried is mostly copy-pasting from the example like so:
[[c++]]
uint32_t dummy;
uint16_t adcVal = (rawVal >> 1) & 0x7FFF;
dummy = (uint32_t)(adcVal << 1) * 100 * (uint32_t)430; // 430 is the Rref value, hardcoded for now
dummy >>= 16;
uint16_t ohmx100 = (uint16_t)(dummy & 0xFFFF);
But I must be doing something wrong because I'm getting no reading (2000 celsius). I also don't know how to debug stuff so I'm going through this blindfolded, not knowing what values those variables have.