Hopefully a simple fix, but can't seem to find it.
I am using crcmod to calculate the CRC-8 with polynomial x^8 + x^2 + x + 1 (0x07).
import crcmod
crcPoly = 0b100000111 # x^8 + x^2 + x + 1 (Hex: 0x07)
buff = 0b01110001 # (Hex: 0x71)
CRC = crcmod.mkCrcFun(crcPoly)
crc = CRC(chr(buff).encode('utf-8'))
print(hex(crc))
This prints 0xa, but both CRC-8 Calc and arduino code, gives me 0x50.
Any suggestions much appreciated. Please keep it simple as evidently I am not sure with datatypes etc.
SOLVED USING CRC8: