Thank you very much for taking the time to work that out for me, it is much appreciated. I was unable to solve that on my own and was able to get it to work with a slightly different approach - I consulted with a very smart friend today who is better than I am at algebra, but he could not condense it down to a simple ratio.
You did manage to do it, however I cannot get your final equation to return a correct result in my code, so I suspect there is an error somewhere, either in my approach, or your formula. I appreciate your effort, but since this forum is used as a reference for lots of things, I thought I’d let you know so nobody else grabs it without further testing.
I’ve since upgraded to a 16-bit ADC and am getting the proper results by using the voltage divider on the right to establish exactly what vin is, then using that to solve for T in the left voltage divider, in two separate equations.
A0 and A1 are swapped places as drawn in my circuit diagram now and in this example code, so don’t get confused by that. It’s adapted from an adafruit example. I’ve also input the exact resistor values in the appropriate places in the code. It’s returning a result within 1 ohm of being a correct result, so I’m satisfied with that. I need to do some cleanup on it and incorporate it into my larger project. I’d be willing to try further condensing it down using your formula, but at this point I’m satisfied and can move on as well.
Adafruit_ADS1115 ads1115(0x48); // construct an ads1115 at address 0x49
Serial.println("Getting single-ended readings from AIN0.1");
Serial.println("ADC Range: +/- 6.144V (1 bit = 3mV)");
int16_t adc0, adc1;
float volts0, volts1, volts3;
adc0 = ads1115.readADC_SingleEnded(0);
adc1 = ads1115.readADC_SingleEnded(1);
Serial.print("AIN0: "); Serial.println(adc0);
volts0=(adc0 * 0.1875)/1000;
Serial.print("AIN0v: "); Serial.println(volts0,7);
Serial.print("AIN1: "); Serial.println(adc1);
volts1=(adc1 * 0.1875)/1000;
Serial.print("AIN1v: "); Serial.println(volts1,7);
Serial.println(" ------ T ------");
//R=47000/((pow(2,16)-1)/adc1 -1); //assumes 5v vin
Serial.print("AIN1r: "); Serial.println(R);