miss counted DS18B20 temperature sensor

hi guys:
I have some problem with DS18B20 temperature sensor. When I plug in 5 sensors, it only give me 3 of them, sometimes it's even less. I wonder if there is anyway to fix it?

I realized that the function, begin() in the DallasTemperature library is the function that decide if we can get the total amount of sensors right.

It may be just be bad wiring, but nobody can help you if you keep your code secret.

MikeLuo:
I realized that the function, begin() in the DallasTemperature library is the function that decide if we can get the total amount of sensors right.

Who would know? You shouldn't even need to look in the DallasTemperature library.

how long are your wires?
do you use a (4K7) pull up resistor?