-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3615de2
commit fbb3147
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,27 @@ | ||
# ping-rs | ||
https://docs.bluerobotics.com/ping-rs/ping_rs/ | ||
|
||
## Using example: | ||
|
||
To run examples use: | ||
|
||
```shell | ||
cargo run --example ping_1d /dev/ttyUSB0 115200 | ||
``` | ||
|
||
Should output: | ||
```shell | ||
Parsing user provided values... | ||
Creating your Pin1D device | ||
Creating a subscription channel which will receive 30 Profile measurements, we'll check this after the next methods! | ||
Testing set/get Device ID | ||
Testing set command, all set commands check for their Ack message, Error and NAck error are possible | ||
Creating two futures to read Protocol Version and Device ID | ||
Reading the protocol version | ||
Reading the device_id | ||
Protocol version is: ProtocolVersionStruct { version_major: 1, version_minor: 0, version_patch: 0, reserved: 0 } | ||
Device ID is: DeviceIdStruct { device_id: 1 } | ||
Read the 30 packages we are waiting since the start of this example, all above tasks have success, we did it! | ||
Received a ProfileStruct Vector with length of 30 | ||
Turning-off the continuous messages stream from Ping1D | ||
``` |