The frequency command for the LRF50H is 5A 0B 02 <divisor little-endian> <check>, and the module replies with the same bytes with 0x8B in the second position. Output frequency = 1,000,000 / (divisor + 1).
Examples from the datasheet: divisor 999 (bytes E7 03) gives 1000 Hz, the default; the request is 5A 0B 02 E7 03 08 and the reply 5A 8B 02 E7 03 88.
For 100 Hz: divisor = 1,000,000 / 100 - 1 = 9999 = 0x270F, little-endian 0F 27. The check byte is the bitwise inverse of the sum of all bytes from the second to the second-last: 0x0B + 0x02 + 0x0F + 0x27 = 0x43, inverted 0xBC. Frame: 5A 0B 02 0F 27 BC. Read the setting back with 5A 1B 02 1B 1B AC.
About the limits: the specification table says 20 Hz to 10 kHz with 1 kHz default, but the note under the command table says "serial frequency only supports 20-20KHz". Datasheet inconsistent; use the specification table (up to 10 kHz) and ask us to confirm in writing if you need the top of the range. Your host and parser still have to keep up with the output rate you choose.
def lrf50h_set_rate(hz):
div = 1_000_000 // hz - 1
body = [0x5A, 0x0B, 0x02, div & 0xFF, (div >> 8) & 0xFF]
chk = (~sum(body[1:])) & 0xFF
return bytes(body + [chk])
Remember that the module streams on its own after power-up, so stop ranging (5A 0A 02 00 00 F3) before sending configuration and start it again with 5A 0A 02 02 00 F1. The LRF50H also needs 9-36 V DC, not the 5 V pin of a flight controller or MCU board. The datasheet does not specify the TX/RX signal level for this model; email us and we confirm in writing.
Sources:
ERDI Verified Answer — checked against the datasheet by ERDI Engineering.