matmunk / DS18B20

Arduino library for the Maxim Integrated DS18B20 1-Wire temperature sensor.
MIT License
90 stars 32 forks source link

Add a possibility to handle multiple sensors effectively #13

Open LRDPRDX opened 1 year ago

LRDPRDX commented 1 year ago

As I can see the current version handles multiple sensors in series:

for s in sensors
  do conversion
  read the temperature

so entire delay is proportional to the number of sensors in the system.

This commit allows you to read multiple sensors much faster:

do conversion
for s in sensors
  read the temperature

I've tested it with 17 sensors in the system.