Hopefully a simple one, I just can't figure out with all these datatypes.
I am using the CRC library for Arduino.
The CRC requires a constructor which is a char string (I think this is in ASCII):
char str[24] = "123456789";
crc8((uint8_t *)str, 9, 0x07), HEX);
I need to use CRC for a one byte message, for example:
uint8_t buff = 0b01110001;
I have tried a for loop to convert:
for(int i=0; i<8; i++){
charArr[i] = bitRead(buff,i);
}
But receiving the wrong CRC8 Value when using a CRC Calculator.
Any suggestions appreciated. Please keep it simple