[VERY BASIC] Measuring resistance.

R2 is there to make your measurement safe for the Arduino, the smaller R2 the higher the max current when R1 is zero.

You can use swappable R2 for different resistances on R1 to get better resolution.

Ohms law is here again.
Current I=Vcc/(R1+R2)
What you get in to analog input is, Uin=I * R1

Be sure your R2 is big enough if R1 is getting closer to zero.

Cheers,
Kari