https://github.com/nordmoen/hc-sr04
Rust embedded-hal sensor crate for HC-SR04
https://github.com/nordmoen/hc-sr04
distance-sensor embedded-hal-driver no-std rust ultrasonic-sensor
Last synced: 9 months ago
JSON representation
Rust embedded-hal sensor crate for HC-SR04
- Host: GitHub
- URL: https://github.com/nordmoen/hc-sr04
- Owner: nordmoen
- License: apache-2.0
- Created: 2018-03-27T08:30:59.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2019-01-04T14:13:58.000Z (over 7 years ago)
- Last Synced: 2025-04-08T18:17:48.326Z (about 1 year ago)
- Topics: distance-sensor, embedded-hal-driver, no-std, rust, ultrasonic-sensor
- Language: Rust
- Size: 12.7 KB
- Stars: 17
- Watchers: 1
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# `hc-sr04`
> A platform agnostic driver to interface with the HC-SR04 (ultrasonic distance)
## What works
- Estimating distance based on interrupt
## Examples
See the [`examples`][3] folder for usage. To find the dependencies of the examples
copy the `dev-dependencies` from `Cargo.toml`.
## TODO
- [x] Test on embedded target (tested on [`f3`][1], see example)
- [ ] Move to timers based purely on [`embedded-hal`][2]
- [ ] Find out why crate only seem to work in `--release` mode
- [ ] Test on single board computer (RPi etc.)
- [ ] Gather feedback on API
## License
Licensed under either of
- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or
http://www.apache.org/licenses/LICENSE-2.0)
- MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
at your option.
[1]: https://github.com/japaric/f3
[2]: https://github.com/japaric/embedded-hal/issues/59
[3]: examples/