I have a question about retreiving data from a multiple sensor 1-Wire bus using an Arduino UNO.
Is this the correct way to request the data involving two DS18B20 sensors on a one wire bus:
float flue_pipe_temp;
float blr_sup_wtr_temp;
sensors.requestTemperatures();
flue_pipe_temp = sensors.getTempFByIndex(0); // sensor 1
blr_sup_wtr_temp = sensors.getTempFByIndex(1); // sensor 2
The above code works and I can create an independent temp change with each of the two sensors.
Is my understanding correct that the 'getTempFByIndex' function requires an increment for each additional sensor?
Also if I want to use another digital input pin for a second 1-Wire bus do I simply need to add an additional line of #define? And the sensors.requestTemperatures(); function will then scan both buses?
#define ONE_WIRE_BUS 4 // define first bus input pin
#define ONE_WIRE_BUS 6 // define 2nd bus input pin
OneWire oneWire(ONE_WIRE_BUS); // Setup a oneWire instance to communicate with OneWire devices
DallasTemperature sensors(&oneWire);
