Skip to content

Commit a48e4d9

Browse files
authored
Update README.md
1 parent 0333cd1 commit a48e4d9

1 file changed

Lines changed: 7 additions & 17 deletions

File tree

README.md

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ with Lidar.open("LDROBOT-LD14P", "/dev/serial0") as lidar:
4343
```
4444

4545
Model names are `MANUFACTURER-MODEL` (e.g. `YDLIDAR-X4`, `RPLIDAR-A1`) — see the
46-
[model table](https://github.com/kaiaai/lds2d#supported-models). Want a flat stream instead of grouped scans?
47-
Use `lidar.points()`.
46+
[model table](https://github.com/kaiaai/lds2d#supported-models).
47+
Use `lidar.points()` to get a flat stream instead of grouped scans.
4848

4949
### Motor control (LDROBOT-LD14P)
5050

@@ -145,17 +145,7 @@ The `read`/`motor` commands default to `LDROBOT-LD14P`; pass `--model` for other
145145

146146
## Live visualizer
147147

148-
Want to *see* the sweep? `lds2d viz` serves a live polar plot you can open in any
149-
browser on your network — no GUI on the Pi required.
150-
151-
**No LiDAR yet? Try it right now with the built-in demo** — it synthesises a moving
152-
2D scene (walls, pillars, a desk, someone pacing), so you get the radar with zero
153-
hardware:
154-
155-
```
156-
pip install 'lds2d[viz]'
157-
lds2d viz --demo # then open http://localhost:8080
158-
```
148+
`lds2d viz` shows a live polar plot you can open in any browser on your network — no GUI on the Pi required.
159149

160150
With a real sensor attached:
161151

@@ -171,7 +161,7 @@ Then open `http://<your-pi>:8080`. Points are coloured by signal strength and th
171161
range ring auto-scales to the room; the HUD shows the live scan rate and point
172162
count. Under the hood it's a background reader thread feeding a thread-safe
173163
latest-scan buffer that a tiny Flask app exposes as JSON — and like every other
174-
moving part in `lds2d`, the buffer and scanJSON conversion are
164+
moving part in `lds2d`, the buffer and scan-to-JSON conversion are
175165
[unit-tested without any hardware](https://github.com/kaiaai/lds2d/blob/main/tests/test_viz.py).
176166

177167
```python
@@ -244,7 +234,7 @@ lds2d --model YDLIDAR-X4 read
244234
XV11 — let the Pi spin the motor over a GPIO with
245235
[`gpiozero`](https://gpiozero.readthedocs.io/), which on the Pi 5 talks through
246236
the `lgpio` backend. Both ship with Raspberry Pi OS as `python3-gpiozero` /
247-
`python3-lgpio`. Two snags trip people up: recent Raspberry Pi OS blocks `pip`
237+
`python3-lgpio`. Two snags to avoid: recent Raspberry Pi OS blocks `pip`
248238
from installing into the system Python (PEP 668), and the `lgpio` wheel won't
249239
build from PyPI without `swig`. The painless way is a venv that can **see** the
250240
system GPIO packages:
@@ -258,8 +248,8 @@ lds2d --model 3IROBOTIX-DELTA-2A --pwm software --pwm-pin 18 read
258248
```
259249

260250
`--system-site-packages` lets the venv use the system `gpiozero`/`lgpio` while
261-
`lds2d` and `pyserial` come from PyPI. Prefer a fully isolated venv instead?
262-
Install the build tools first — `sudo apt install -y swig python3-dev` — then
251+
`lds2d` and `pyserial` come from PyPI. If you're using a fully isolated venv instead,
252+
install the build tools first — `sudo apt install -y swig python3-dev` — then
263253
`pip install 'lds2d[pwm]' lgpio` builds the backend inside it.
264254

265255
> The motor PWM pin is `--pwm-pin` on the CLI / `pwm_pin=` in Python (default

0 commit comments

Comments
 (0)