Readings, some times my project works great,so i dont think its a code issue

I have 4 DS18B20’s and 1 DHT11 along with one push button.
Sometimes the DS18b20’s read -196, and the DHT11 will read zero and the push button will be on.
sometimes this is only for a second or two, other times it will be hours.

Any ideas as to why? Right now it all on a bread board, want to work it out before coming up with a long term
hard wired project.

Thanks for any input,
LockMan

If you don’t think it’s a code issue there are few options:

  1. Breadboard connection.
  2. Power supply issues
  3. Knockoff components

if you use too many DS18B20 on the same board,it will goes wrong.

you can refer this file

Problem solved.
Bad wiring connection.