🌀

LiDAR

One turn and the space is drawn

Page 35 of 36 MCP / API open OTA updates

Page 35 drives an LD06 / LD19 class spinning lidar over Serial2 (39 = RX / 38 = TX at 230400), which leaves 43/44 free — so it can run alongside GNSS and SMS.

Frames are a fixed 47 bytes: 0x54 start, 0x2C meaning twelve points follow, then speed, start and end angle, timestamp, CRC8 and twelve "distance + confidence" pairs. Two things must be handled when drawing: crossing 0° makes the end angle smaller than the start angle, so the span needs +360° or a wedge is misplaced every time the sweep passes straight ahead; and every point needs a 1.5-second expiry, otherwise dozens of revolutions smear into a blob. Redraw is capped at 6 Hz, but serial capture must never be throttled or the buffer overflows and frames are dropped.

Screen

On-screen interface

A recreation of this page on the 2.41-inch AMOLED display (600 × 450). Actual interaction and layout follow the latest firmware.

LiDAR LD06 · 300 rpm
Nearest0.42m · 12 points/frame
30 pointsexpires in 1.5 s6 Hz refresh
0°0.42 m
45°1.18 m
90°0.86 m
135°2.04 m
180°1.57 m
270°0.63 m
Screen · Page 35
May differ from the actual interface; the screen of the real device is the final reference.
Highlights

Key capabilities

🌀

12 points per frame

Fixed 47-byte frames, speed and angles included.

🔄

0° wrap fixed

end < start adds 360° so straight ahead has no seam.

⏳

1.5 s expiry

Old points fade out instead of smearing.

⚡

Unthrottled capture

Only the redraw is limited, so no frames are lost.

Specifications

Technical specs

ModelLD06 / LD19 (47-byte fixed frames)
SerialSerial2: 39 = RX / 38 = TX, 230400
Power5 V — the module has a motor and will not run on 3V3
Refresh6 Hz redraw; points expire after 1.5 s
Use Cases

Typical scenarios

Room outline

One revolution shows the room size and where the furniture is.

Obstacle range

Take the nearest distance straight ahead for simple avoidance.

Commands

Related commands

page 35  Open the LiDAR page
lidar  Speed, point count and nearest distance
lidar range 12  Only draw points within 12 m
lidar sim on  Inject a synthetic cloud (flagged red on screen)
lidar clr  Clear the current cloud
lidar rx <hex>  Feed one raw frame through the real parser

Read the full API & command reference →

⚠ Boundaries & notes
  • Needs 5 V: on 3V3 the motor bogs down and it looks like "connected but no data".
  • Glass, mirrors and matte black surfaces give bad ranges — a physical limit of the sensor.
  • Exclusive with the logic analyser, which needs the same high-speed sampling.

Other feature pages