I had working code for several DS18B20 sensors connected on one bus. However, once number of devices increased to 11 I started to get no readings from several sensors. Tried all sensors individually, all work fine, but once all 11 were connected, I got same issue. So I thought to try to split sensors into two groups and have two bus. Both would have connection to same 3,3V power supply from ESP32, same ground connection, but separate data connectors to separate ESP32 pins with 4,7K pull up resistors.
My code looks like this:
Code: Select all
t1 = machine.Pin(5) # DS18B20 temp THsensor device is on GPIO5
ds1 = ds18x20.DS18X20(onewire.OneWire(t1)) # create the onewire object
t2 = machine.Pin(34) # DS18B20 temp THsensor device is on GPIO34
ds2 = ds18x20.DS18X20(onewire.OneWire(t2)) # create the onewire object
code stops in line starting with "ds2"
Does that mean that only one one wire can be created?