Parallax Ping Sensor Arduino/Wiring Library
C++
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
Keywords.txt
LICENSE
Ping.cpp
Ping.h
README.textile
VERSION

README.textile

Ping

Parallax Ping Sensor Arduino/Wiring Library

Example


#include <Ping.h>
#define PINGFRONT 4
#define PINGRIGHT 5
#define PINGLEFT 6

Ping ping_front(PINGFRONT, INCHES);
Ping ping_right(PINGRIGHT, INCHES);
Ping ping_left(PINGLEFT, INCHES);

void setup() {
  Serial.begin(9600);
}

void loop() {
  Serial.print("Ping Left: ");
  Serial.println(ping_left.read());
  Serial.print("Ping Front: ");
  Serial.println(ping_front.read());
  Serial.print("Ping Right: ");
  Serial.println(ping_right.read());
  delay(500);
}

Install


  cd your_arduino_folder/hardware/libraries/
  
  git clone git://github.com/kristopher/Ping.git

Homepage

http://github.com/kristopher/ping