meurig / esp-water-temp

Log water temp to thingspeak using an esp-01 and a ds18B20 temp sensor
GNU General Public License v3.0
0 stars 1 forks source link

Add support for multiple temperature sensors #7

Open meurig opened 7 years ago

meurig commented 7 years ago

How about two or three ds18b20 sensors all hooked up in parallel?

I think it would be easy to add headers for this and I think they support all running on the same bus. Not sure if you'd need a pull up resistor for each, but would be great if not!

meurig commented 7 years ago

This page: http://www.tweaking4all.com/hardware/arduino/arduino-ds18b20-temperature-sensor/

And in particular, this diagram on that page: image

Suggests only one pull up is needed (which makes sense when you think about it).

meurig commented 7 years ago

This page gives us the available functions in the DallasTemperature library: https://github.com/milesburton/Arduino-Temperature-Control-Library/blob/master/DallasTemperature.h

In particular, the getDeviceCount function is going to be very important for this issue:

    // returns the number of devices found on the bus
    uint8_t getDeviceCount(void);

I now need to add some extra headers to one of my stripboard sensor boards to test this out, or rebuild the same on a breadboard.