Changes

Jump to navigation Jump to search
6 bytes added ,  22:15, 26 April 2020
* speed is a two-byte information, little-endian. It represents the speed, in 64th of RPM (aka value in RPM represented in fixed point, with 6 bits used for the decimal part).
* Data 0 to Data 3 are the 4 readings. Each one is 4 bytes long, and organized as follows :
<br /> byte 0 : Distance 7:0  byte 1 : “invalid data” flag : “strength warning” flag  byte 2 : Signal Strength 7:0  byte 3 : Signal Strength 15:8
As chenglung points out, the distance information is in mm, and coded on 14 bits. This puts the tests made by Sparkfun in a room of around 3.3m x 3.9m (11ft x 13 ft ?), which seems reasonable.
The algorithm is as follows, provided that `data` is the list of the 20 first bytes, in the same order they arrived in.
 
<br />
def checksum(data):

Navigation menu