Hi, i have some problems saving the address of the sensors in a struct, if i directly get the address in the struct it compiles and uploads but behaves erratically (never exits the loop where it should put the address in the struct, and it crashes).
if i save the address in a temporary address object it says "invalid array assignment"
this is a part of the sketch
struct sensorstructure {
DeviceAddress address;
};
struct datastructure {
struct sensorstructure sensor[3];
int totalNumberOfSensors;
};
datastructure data;
DeviceAddress tempAddress;
..............
oneWire.reset_search();
for (y = 0; y < x; y++)
{
oneWire.search(tempAddress);
data.sensor[y].address = tempAddress;
}
if i change it to this, it goes very bad...
oneWire.search(data.sensor[y].address);
I really can't find why, sure i am missing something, can anyone help?
Thanx!