diff --git a/README.md b/README.md index ad19b91b0..237aa408b 100644 --- a/README.md +++ b/README.md @@ -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 +``` \ No newline at end of file