Skip to content

Commit

Permalink
README: Update example with udp and bridges instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
RaulTrombin authored and patrickelectric committed May 14, 2024
1 parent 94e2d68 commit 669c5c9
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ https://docs.bluerobotics.com/ping-rs/bluerobotics_ping/
To run examples use:

```shell
cargo run --example ping_1d -- --port-name /dev/ttyUSB0
cargo run --example ping_1d -- --serial-port /dev/ttyUSB0
```

Should output:
Expand Down Expand Up @@ -34,4 +34,20 @@ The distance to target is: 4538 mm
Waiting for 30 profiles...
Received 30 profiles
Turning-off the continuous messages stream from Ping1D
```
```
### **Pro tip** :grey_exclamation:
For external use via UDP, consider using [bridges](https://github.com/patrickelectric/bridges) to share your serial device to the network. Detailed instructions can be found [here](https://github.com/patrickelectric/bridges?tab=readme-ov-file#install-zap).

#### On the host :satellite: (Where ping device is connected):

```shell
bridges --port /dev/ttyUSB0:115200 -u 0.0.0.0:8080
```

#### On the client :computer::

```shell
cargo run --example ping_1d -- --udp-address 192.168.0.191 --udp-port 8080
```

Enjoy exploring with ping-rs! :ocean:

0 comments on commit 669c5c9

Please sign in to comment.