The standard was for setting these up is to give them a char array. But I plan to use more than 10 of them and use the code for a couple different applications so I want to create a matrix of them to make processing easier.
Currently I do this with thermistors by initializing something like:
const int NUMSAMPLES = 64;
uint32_t samplesTotal[numberOfThermistors];
uint32_t samples[numberOfThermistors][NUMSAMPLES];
It works well and I've been happy with it, but there's too much noise in my application and the readings are all over the place, so I'm switching to digital.
Standard initialization is something like:
uint8_t sensor1[8] = { 0x28, 0xE6, 0x02, 0x94, 0x97, 0x12, 0x03, 0x24 };
but I want to make that a matrix that I can work with more easily. Something like:
float tempSensor[1][8] = { 0x28, 0x58, 0x2A, 0x94, 0x97, 0x11, 0x03, 0xA3 };
float tempSensor[2][8] = { 0x28, 0xBA, 0x07, 0x94, 0x97, 0x09, 0x03, 0x6A };
but this gives me a "conflicting declaration" error.
How can I do something like this where each sensor has a unique index and uses its unique address?
Thanks in advance for your help!