Reading in sensors - need to decode 18 bit stream into....floats?
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import struct
|
||||
from bitstring import BitArray
|
||||
test = b"5\x01\'\x02\xfd\x02/\x02e\x01%\xfd8\xc8Xn<\xc3"
|
||||
# test = b'\x0f\x00'
|
||||
# print(len(test))
|
||||
# first = test[:4]
|
||||
#
|
||||
# last = test[14:]
|
||||
#
|
||||
|
||||
print(BitArray(test).bin[:1])
|
||||
Reference in New Issue
Block a user