Jan-16-2022, 11:53 PM
Hi, I am using SPI on Raspberry Pi (master) and collecting 4 bytes at a time. I need to convert this back to integer. How can I do it?
When I do it using struct...it gives some random garbage values:
When I do it using struct...it gives some random garbage values:
b=spi.readbytes(4) value=struct.unpack("<I", bytearray(b))[0] print (value)Thanks.