Multiple OneWire DS18B20 Instances?
Posted: Thu Jan 18, 2024 9:50 pm
This is kind of a long storey with some questions at the end.
I need to collect data from 12 DS18b20 one wire temperature sensors. I have learned (form experimenting) that the most I can have on one GPI/O, instance, is 7. The reason for this is that they are scattered about a building and there is a fair amount of wire between them.
I tried setting up two instances of one wire on two GPIO and had problems using the arduino OneWire and DallasTemperature libraries. I could only get one instance to run at a time on an ESP8266 (a WEMOS R1 D1). If I used the sensors.getTempFByIndex it would see both buses, but when I tried to read temperatures by their hex address it would only work on one bus and the other was un-accessable. I think that I read somewhere it was due to some clunky arrays or tables or something in the OneWire library.
So now I am setting up an ESP32-S3-DevKitC-1-N8R8 to do the same job.
Has anybody been able to get two instances of OneWire to work?
How?
Any ideas of other things I could try?
Thanks,
JP.
I need to collect data from 12 DS18b20 one wire temperature sensors. I have learned (form experimenting) that the most I can have on one GPI/O, instance, is 7. The reason for this is that they are scattered about a building and there is a fair amount of wire between them.
I tried setting up two instances of one wire on two GPIO and had problems using the arduino OneWire and DallasTemperature libraries. I could only get one instance to run at a time on an ESP8266 (a WEMOS R1 D1). If I used the sensors.getTempFByIndex it would see both buses, but when I tried to read temperatures by their hex address it would only work on one bus and the other was un-accessable. I think that I read somewhere it was due to some clunky arrays or tables or something in the OneWire library.
So now I am setting up an ESP32-S3-DevKitC-1-N8R8 to do the same job.
Has anybody been able to get two instances of OneWire to work?
How?
Any ideas of other things I could try?
Thanks,
JP.