# Libcanard: Examples, Starters, Tutorials

**URL:** <https://forum.opencyphal.org/t/libcanard-examples-starters-tutorials/935>\
**Category:** Libcanard\
**Created:** [September 7, 2020, 7:33am UTC](https://forum.opencyphal.org/t/libcanard-examples-starters-tutorials/935 "2020-09-07T07:33:38Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![hugo](https://forum.opencyphal.org/letter_avatar_proxy/v4/letter/h/b38774/32.png) [@hugo](https://forum.opencyphal.org/u/hugo)\
**Post date:** [September 23, 2020, 10:34am UTC](https://forum.opencyphal.org/t/libcanard-examples-starters-tutorials/935/5 "2020-09-23T10:34:21Z")

</div>

## Raspberry Pi with ultrasound example in C

The code is meant to be run using two Raspberry Pi. Each Pi is connected to a MCP2515 module. One Pi is connected to a HC-SR04 ultrasound sensor. The sensor calculated distance to an obstacle is transmitted as a 32bit float. The float is serialized using canard\_dsdl.h. At the reciving end the float is deserialized and the distance is printed to the console.

The code can be found at:

### [raspberry-can-HC-SR04](https://github.com/bluecorn/raspberry-can-HC-SR04)

### [raspberry-can-master-ultrasound](https://github.com/bluecorn/raspberry-can-master-ultrasound)

---

_[View the full topic](https://forum.opencyphal.org/t/libcanard-examples-starters-tutorials/935)._
