My sketch was working till I have initialised all object in global section of sketch.
But is it possible somehow to declare array of pointers like this:
OneWire *oneWiresArray[sensorPortsCount];// later will be added &oneWire,&oneWire2,&oneWire3
DallasTemperature *sensorsPortsArray[sensorPortsCount]; //&sensors,&sensors2,&sensors3
and to initialise values not in global section, but in loop, or another function?
for (int i = 0; i < sensorPortsCount; i++) {
OneWire l_oneWire(oneWirePortArray*);*
oneWiresArray = &l_oneWire;
* DallasTemperature l_sensors(&l_oneWire);
sensorsPortsArray = &l_sensors;
_ }*
It seems that wwhen I create this in setup,it working in setup function
and it is possible to call it in loop, but it seems, that object are not well configured,, it seems like some data are not initialised completely_