PropWare
C++ objects and CMake build system for Parallax Propeller
Home
Download
Getting Started
Documentation
Reference
About
Related Links
Namespace List
Class List
File List
Examples
Build System
File List
File Members
propsideworkspace
Learn
Examples
Devices
Sensor
Ping))) Ultrasonic Distance
Test Ping Distance.c
1
/*
2
Test Ping Distance.c
3
4
Measure and display Ping))) Ultrasonic Distance Sensor distance measurements.
5
6
http://learn.parallax.com/propeller-c-simple-devices/sense-distance-ping
7
*/
8
9
#include "simpletools.h"
// Include simpletools header
10
#include "ping.h"
// Include ping header
11
12
int
main
()
// main function
13
{
14
while
(1)
// Repeat indefinitely
15
{
16
int
cmDist = ping_cm(15);
// Get cm distance from Ping)))
17
print(
"cmDist = %d\n"
, cmDist);
// Display distance
18
pause(200);
// Wait 1/5 second
19
}
20
}
21
main
int main(void)
Definition:
GraphicsTest.c:20
Generated on Sat Aug 27 2016 00:58:03 for PropWare by
1.8.12