DS18B20 problem with wiring

Check your wiring, paying particular attention to the datasheet - IIRC, it shows the pinout looking from the bottom, which caught me out.