Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

omaraflak/HC-SR04-Raspberry-Pi-C-

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HC-SR04 Raspberry Pi C++

This class allows you to get datas from the HC-SR04 sensor easily in C++!

  • Download WiringPi library

      git clone git://git.drogon.net/wiringPi
      cd wiringPi
      git pull origin
      cd wiringPi
      ./build
    
  • Use the Sonar class as follows:

      Sonar sonar;
      int distance = sonar.distance(30000); // 30000 is a timeout in microseconds
    

Sample: https://github.com/omaflak/HC-SR04-Raspberry-Pi-C-/blob/master/libSonarSample.cpp

About

This class allows you to get datas from the HC-SR04 sensor easily in C++!

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
Morty Proxy This is a proxified and sanitized view of the page, visit original site.