<div dir="ltr">Hi,<div><br></div><div>I have just started adding the code to support multiple DS18B20 external temperature sensors (see <a href="https://github.com/opentrv/OTRadioLink/pull/44">https://github.com/opentrv/OTRadioLink/pull/44</a>) but I have some queries regarding the sensor API before moving forward.</div><div><br></div><div>Currently an instance of the TemperatureC16_DS18B20 class is needed for each DS18B20 sensor and at 17 bytes each this could limit the number of sensors that can be used. The API could be changed to pass an address to the read method dropping the memory usage down to 8 bytes (or even 7 bytes as the first byte is always 0x28) per sensor or even just an index that would require no additional bytes per sensor, but probably a little slower to read the sensor. As an aside, I am not sure what determines the order on the bus so there may be a possibility of the sensors being in a different order per read or per power-cycle. </div><div><br></div><div>The obvious down side to changing the API is that you loose the nice consistent API that all the sensors have and will have to start adding a bunch of special cases to read the DS18B20 which I would think is probably not a critical use case so may not warrant polluting the code base, that being said are there other sensors that you may have multiple instances of and thus is it worth changing the base class to support indexed/addressed reads of a single sensor type?</div><div><br></div><div>The other question I have is how important would hot swapping the temp sensors be, or is it ok to expect a power cycle after adding/removing/changing a sensor?</div><div><br></div><div>Thoughts? </div><div><br></div><div>Jeremy</div></div>