The software needs to talk to the external device on the pin which you tell it to use. You have to actually connect the device to the same pin.
If you specify in the software that you are going to use pin 12, then you need to actually connect the device to pin 12. You said you used pin 18, which DOESN'T MAKE SENSE.
Using the pin with the hardware led really isn't the best idea, the one-wire bus transmission works by the microcontroller and the device pulling the voltage on that one wire down, having a led connected to that wire might be counterproductive. Use another pin, BUT MAKE SURE THE PIN YOU SPECIFY IN THE SKETCH IS THE SAME PIN THAT YOU PHYSICALLY CONNECTED THE DEVICE TO.