source: rtos_arduino/trunk/arduino_lib/libraries/RobotIRremote/src/IRremoteTools.cpp@ 136

Last change on this file since 136 was 136, checked in by ertl-honda, 8 years ago

ライブラリとOS及びベーシックなサンプルの追加.

File size: 503 bytes
Line 
1#include "IRremote.h"
2#include "IRremoteTools.h"
3#include <Arduino.h>
4
5int RECV_PIN = TKD2; // the pin the IR receiver is connected to
6IRrecv irrecv(RECV_PIN); // an instance of the IR receiver object
7decode_results results; // container for received IR codes
8
9void beginIRremote(){
10 irrecv.enableIRIn(); // Start the receiver
11}
12
13bool IRrecived(){
14 return irrecv.decode(&results);
15}
16
17void resumeIRremote(){
18 irrecv.resume(); // resume receiver
19}
20
21unsigned long getIRresult(){
22 return results.value;
23}
Note: See TracBrowser for help on using the repository browser.