Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/matheusamazonas/ultrino
Arduino library for the HC-SR04 ultrasonic sensor
https://github.com/matheusamazonas/ultrino
arduino arduino-library arduino-sensors hcsr04
Last synced: 2 days ago
JSON representation
Arduino library for the HC-SR04 ultrasonic sensor
- Host: GitHub
- URL: https://github.com/matheusamazonas/ultrino
- Owner: matheusamazonas
- License: mit
- Created: 2018-07-14T13:59:16.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-09-13T09:02:50.000Z (over 6 years ago)
- Last Synced: 2024-12-17T06:46:32.456Z (6 days ago)
- Topics: arduino, arduino-library, arduino-sensors, hcsr04
- Language: C++
- Size: 22.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Ultrino
Arduino library for the HC-SR04 ultrasonic sensor. The distance is returned in centimeters.Linux: : [![Build Status](https://travis-ci.com/matheusamazonas/Ultrino.svg?branch=master)](https://travis-ci.com/matheusamazonas/Ultrino)
Installation
-------------
For a simple, easy installation download the repository as a zip file and follow the instructions on [how to install an Arduino library from a zip file](https://www.arduino.cc/en/Guide/Libraries#toc4).Example
-------------
The example below is also in the `examples` folder. The manifacturer recomends an interval of at least 60 milliseconds between readings.```cpp
#includeUltrino us(2,4);
void setup() {
Serial.begin(9600);
while (!Serial) {
}
Serial.println("Setup is done");
}void loop() {
Serial.print("Distance: ");
Serial.println(us.getDistance());
delay(60); // Recommended by manufacturer
}```