I have a resistor that absolutely must be connected to ground. (There is no other way, so don't even ask!) It has a variable resistance based on temperature. I can't figure out how to get the resistor's resistance without connecting it directly between 5v and the analog input. How do I get the resistor's resistance by connecting it like this:
// 5v------10k---------Resistor------GND or 5v------10k-------Resistor-------GND or 5v--------10k-------Resistor--------GND
// | | |
// Analog Analog Analog
By the way, the temperature based on the resistor's resistance is given by this equation: T = 46 / R^.40984
You have the right idea. As mike posted while I was writing you need a voltage divider. In your first setup where you have 5V->10K-> Variable Resistor -> GND the voltage between the 10K and your resistor will change depending on the resistance of your variable resistor. To find the resistance we use the formula for a voltage divider.
Vout=Vin(R2/(R1+R2))
Where:
Vout is the voltage going to the analog input
Vin is your 5V supply
R2 is your variable resistor
R1 is the 10K resistor
In your case this mean that you can find the resistance via the formula R2=-(10,000*Vin)/(Vin-5)