Hi there I am trying to get this list to be built and compare data to it. Have values getting sent as a array and need to store them into DeviceID(1-10) or say 1-100 but they come in from set of values RadioData[1]-RadioData[2] ----RadioData[6] it a 6 byte number that need to get store and then compared
unsigned char radioData[32];//string from the Sensor
retained String Device,Device1,Device2,Device3;
unsigned char DeviceID1,DeviceID2,DeviceID3,DeviceID4,DeviceID5,DeviceID6,DeviceID7,DeviceID8,DeviceID9,DeviceIDA;
void setup() {}
void loop() {
***void DeviceID()***{
unsigned char *DeviceID[]*={radioData[1],radioData[2],radioData[3],radioData[4],radioData[5],radioData[6]};//This is where the data come in and changes Need to store these into different DeviceID and then compare them later on!!!
for (int n=0;n<(int)sizeof(DeviceID);n++){
Device += String::format("%X", DeviceID[n]);
}
Serial.print("Device ID :");
Serial.println(Device);
if (//?????){ //compare the to Devices
unsigned char DeviceID1[]={radioData[1],radioData[2],radioData[3],radioData[4],radioData[5],radioData[6]};
for (int n=0;n<(int)sizeof(DeviceID1);n++){
Serial.print("Device ID 1 :");
Device1 += String::format("%X", DeviceID1[n]);
}
}
}
}
Know this will not fully compile have the radio data coming from a radio but the ID look something like this
unsigned char Device1[6]={0xD8, 0x80, 0x39, 0xAD, 0x55, 0x73};
unsigned char Device2[6]={0xD8, 0x80, 0x39, 0xAD, 0xC9, 0x12};
unsigned char Device3[6]={0xD8, 0x80, 0x39, 0xED, 0x80, 0x4C};
Any help in creating this chart, table , data list would be greatly appreciated.