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
TV Remote
Test SIRC Remote.c
1
/*
2
Test SIRC Remote.c
3
4
http://learn.parallax.com/propeller-c-simple-devices/ir-receiver-and-remote
5
6
Connect 38 kHz IR receiver to Propeller P10
7
Decodes button presses on Sony-compatible IR remote
8
Run with Terminal
9
*/
10
11
#include "simpletools.h"
// Libraries included
12
#include "sirc.h"
13
14
int
main
()
// main function
15
{
16
sirc_setTimeout(1000);
// -1 if no remote code in 1 s
17
18
while
(1)
// Repeat indefinitely
19
{
20
// decoding signal from P10
21
print(
"%c remote button = %d%c"
,
// Display button # decoded
22
HOME, sirc_button(10), CLREOL);
// from signal on P10
23
24
pause(100);
// 1/10 s before loop repeat
25
}
26
}
27
28
main
int main(void)
Definition:
GraphicsTest.c:20
Generated on Sat Aug 27 2016 00:58:03 for PropWare by
1.8.12