VL53L0x sensor with ds18b20 temperature sensor

I made a circuit involving 5x VL53L0x distance meter and 2x ds18b20 temperature sensors, open door sensors, and audible warning

The laser sensors work well, but the temperature sensors do not work only the message -127 appears, but when I use only the temperature sensors it works well

What will it be?

the code and schematic are attached

cod.txt (20.7 KB)

-127 means not connected. In your case it may mean inadequate power.
Read readmes about proper posting of code etc.

I already tested the power supply, and it's ok, but I scan the IC and the temperature sensors do not appear, only the VL530LX sensors.

I've read about posting code, but it didn't fit, said the limit is 9000 characters, and my code is longer

Alexpss:
I already tested the power supply, and it's ok,

All I can do is take that at face value. That means the connection is bad or the code is looking for the wrong address and cannot find it. Bad connection also means wired the wrong way round. If the sensors are seriously hot, that is what has happened.

#define ONE_WIRE_BUS 12 // Define porta do Sensor de Temperatura

Pin 12 is one of the SPI pins, use pin A2 for ONE_WIRE_BUS.

I've already reviewed the entire circuit, tested all the connections, nothing gets hot. Everything connected as it should. I don't think it's a problem of connections, I think something to do with the code, something that I'm not seeing

my question is, is there something in the code that is badly written, that could hinder the functioning of temperature sensors.
I have already reviewed the code several times and found nothing evident. If you have someone with better knowledge of this language to evaluate my code I would appreciate it

You code is clouded by all sorts of stuff I know nothing about, but the temperture stuff looks kosher, indeed similar to the Hacktronics stuff I use, and you have already said that the temps work OK by themselves. Going back, I think JCA34F is right and, when the temp sensors work by themselves they do so because the SPI bus is also out of the game, i.e. no display.

I understand, I will test here and change the pin, for ONE_WIRE_BUS. Thank you JCA34F and Nick_Pyner. Then I give back if it worked

That was it. Thanks for the guidance