Grove Temperature Sensor Reading

Hi everyone,

I want to collect temperature data from a Grove Temperature Sensor connected to my Arduino Nano 33. Following the instructions in this document, , I achieved that. I get pretty accurate results. The only thing is I’d like to understand the code better. First of all, I’m wondering what is the raw output we get from the sensor? I’m trying to figure out this part of the code in particular :

float R = 1023.0/((float)a)-1.0;
R = 100000.0*R;
//convert to temperature via datasheet ;
float temperature=1.0/(log(R/100000.0)/B+1/298.15)-273.15;

More precisely, where does the 1023.0 come from? Could anyone help me out :slight_smile:?


Just guessing: 1023 is the upper limit of the ADC (10 bits)