Hi Guys,
I have an application which requires multiple ESP8266 modules literally contained in a black box. Each module has two DS18B20 temperature sensors. Right now, the sensors are daisy chained to the same GPIO pin. I’m using the unique device serial number to identify each individual sensor, but this gives me a problem in that to know which sensor is reading what temp value, the sensors need to be hard wired. In the field it also means a sesnor can’t simply be replaced with another as the ESP8266 has to be programmed with the new sensor serial number.
In an ideal world, I’d like to have a bucket of ESP8266 modules and a bucket of DS18B20 sensors and with the appropriate connectors, I’d like to be able to connect any sensor to any ESP8266 and configure the temp location in the software. Is it possible to connect one sensor to one GPIO and another sensor to another GPIO – I’m stuck at how I would program “onewire.h” to address both GPIO’s.
Any thoughts welcomed.
Thanks.
Hi.
Yes. You can wire each sensor to a different GPIO,
You just need to make sure you create two OneWire instances in your code with different names.
Do you understand what I mean? Or do you need further help? What code are you using?
Regards,
Sara
Working! (other than I need a second pull-up resistor). Each sensor reads correctly when I switch the one pull-up resistor I have right now, between them. Thank you Sara