I've followed instructions through various sites which have all given the same information about wiring the DS18B20 sensor to a Raspberry Pi (red is 3.3V, black is ground, white connects to GPIO pin 4 and bridged to 3.3V with a 4.7k to 10k pull-up resistor.
sudo modprobe w1_therm ; sudo modprobe w1_gpio
I can see the temperature sensor start to set up under
/sys/bus/w1/devices/ but only the master portion. It never finds a slave device. I see a symlink called "w1_bus_master1" which points back to
/sys/bus/w1/drivers/w1_master_driver but that's all I get. If I follow the symlink, I see files like "w1_master_slave_count" and "w1_master_slaves" but when I cat the "w1_master_slave_count" it always says 0, and looking at the "w1_master_slaves" file always reports "not found."
I'm not sure what else to try. The product page on SparkFun said to use a 4.7k - 10k resistor and one comment on the page said the Dallas sensor could go as low as 2.2k on a 3.3V supply, so I've tried a couple of combinations. I didn't want to try the 5V supply since another user said theirs went up in a puff of smoke on a 5V rail.
I do not have any test equipment to do low-level debugging, so I'm curious what else I can check as to why this sensor isn't setting up properly.
This should be your answer
The sensor worked just fine on a Raspberry Pi B+ but not on the B. I triple checked some docs which claimed that pin 16 was GPIO #4 but other docs said GPIO #4 was pin 7, and hey, whatdya know, it works fine.