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
Circuits
Sense Light.c
1
/*
2
Sense Light.side
3
4
Display light sensor levels.
5
6
http://learn.parallax.com/propeller-c-simple-circuits/sense-light
7
*/
8
9
#include "simpletools.h"
// Include simpletools
10
11
int
main
()
// main function
12
{
13
while
(1)
// Endless loop
14
{
15
high(5);
// Set P5 high
16
pause(1);
// Wait for circuit to charge
17
int
t = rc_time(5, 1);
// Measure decay time on P5
18
print(
"t = %d\n"
, t);
// Display decay time
19
pause(100);
// Wait 1/10th of a second
20
}
21
}
22
main
int main(void)
Definition:
GraphicsTest.c:20
Generated on Sat Aug 27 2016 00:58:03 for PropWare by
1.8.12