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
ActivityBot
Test Whiskers with Terminal.c
1
/*
2
Test Whiskers with Terminal.c
3
4
Display whisker states in terminal. 1 = not pressed, 0 = pressed.
5
*/
6
7
#include "simpletools.h"
// Include simpletools header
8
9
int
main
()
// main function
10
{
11
freqout(4, 2000, 3000);
// Speaker tone: P4, 2 s, 3 kHz
12
while
(1)
// Endless loop
13
{
14
int
wL = input(7);
// Left whisker -> wL variable
15
int
wR = input(8);
// Right whisker -> wR variable
16
print(
"%c"
, HOME);
// Terminal cursor home (top-left)
17
print(
"wL = %d wR = %d"
, wL, wR);
// Display whisker variables
18
pause(50);
// Pause 50 ms before repeat
19
}
20
}
main
int main(void)
Definition:
GraphicsTest.c:20
Generated on Sat Aug 27 2016 00:58:03 for PropWare by
1.8.12