Arduino XOR BCC checksum
I'm not sure what BCC is, so I'll just assume you want the XOR of the array. If this data is constant, you can just calculate the XOR once and make it a constant too:

// 0x02 ^ 0x06 ^ 0x06 ^ 0x06 ^ 0x06 ^ 0x06 = 0x04
byte result = 0x04


Otherwise, you have to do this with variables:

byte result = data[0] ^ data[1] ^ data[2] ^ data[3] ^ data[4] ^ data[5];