This looks great... I'll try it out very soon and post more feedback.
So it seems to work and produce something that correlates with temperature, but the temperature provided is very inaccurate (about 20 degrees F high in one case).
I recognize that there are several issues related to this and I'll see what I can do to improve it.
Thanks very much for this code segment! This basic functionality is exactly what I wanted.
When I tested the code I would get something inaccurate for the very first reading that I did immediately after boot--attributed this to garbage on ADC channel after boot. After that first reading I consistently saw ~91deg F and, as expected, I could watch it jump up when radio activity occurred.
I'm curious what the difference could be on your end. Keep me posted if you figure out what's going on. And let me know if I can help out at all.
I also saw something inaccurate for the first reading; so I looked at the second reading and it was also high but not as high as the first. I attribute this to MCU heating during a busy boot, maybe I'm wrong.
I'm getting 103 F but my target is in a warm location, so the combined heat could be matching yours, but probably both are higher than actual, maybe not, the die temp could really be that high.
I'm most interested in relative temperature change. So accuracy tuning has become a very low priority.
Thanks again Jake!