Projects / HC-SR04 Ultrasonic Arduino ...

HC-SR04 Ultrasonic Arduino Library

HC-SR04 Ultrasonic Arduino Library is specifically for the HC-SR04 ultrasonic sensor. It features timing, metric conversion, and standard deviation methods, plus a few support methods. It is written in C++ to conserve the namespace. The conversion formula can be easily modified to optimize the accuracy of conversion at different distances for inches and centimeters. Multiple buffers of different lengths can be created for determining standard deviation.

Tags
Licenses
Operating Systems
Implementation

RSS Recent releases

  •  08 Dec 2011 05:22

Release Notes: This release makes the Ultrasonic library compatible with Arduino version 1.0 and up.

Release Notes: This is the initial release.

RSS Recent comments

29 Jul 2012 06:56 dmilly

If you are using the arduino-1.0.1 environment, then you must replace "WProgram.h" with "Arduino.h" - works like a charm!

13 Apr 2012 08:35 feravoon Thumbs up

I think, you should set a timout for "pulseIn" in "timing" method. Because if there are multiple sensors, one sensor blocks others, because one sensor waits for an echo for a long time.

Thanks for your effort. This library has been very helpful in my project.

01 Mar 2012 02:11 bigern00

I'm a newbie, so bear with me.

When I try to verify the sketch, it gives me the following error code:

In file included from UltrasonicDemo.cpp:1:
/Users/sabrinawhite/Documents/Arduino/libraries/Ultrasonic/Ultrasonic.h:11:22: error: WProgram.h: No such file or directory

How do I fix this?

Screenshot

Project Spotlight

XML-Grammar-Fiction

Lightweight markup languages and XML grammars for writing prose and screenplays.

Screenshot

Project Spotlight

Kubuntu

An Ubuntu-based Linux distribution that uses KDE.