Nick_Pyner:
Gee, I thought OP said, with extraordinary clarityWhere is the guessing with that?
The fact that the three pin device can be wired as a two pin device seems to be just a silly red herring when your "sensor has two pins only"
he also said withe extraordinary clarity it is a DS18B20 and that device is manufactured with 3 pins.
so, there is confusion somewhere.
starting with the 3 pin DS18B20, it could be wired as a 2 wire device.
hence the incorrect description of it having 2 'pins' and not 2 'wires'
it may not be a DS18B20, but rather a 2-pin device such as a thermocouple or thermistor or RTD..... then the specific device description we were given in the first post would be in error.
hence the multiple requests for photo or more information.
but since we are stripping away the confusion, and using the two bits of information in the first post, a DS18B20 and 2 pins,
The DS18B20 , 3 pin device, can be wired for either 2 wires or 3 wires per the data sheet (linked earlier)
only the OP can clear up the confusion.
[EDIT from the data sheet :
Available in 8-Pin SO (150 mils), 8-Pin µSOP, and 3-Pin TO-92 Packages ]