Last change
on this file since 376 was 136, checked in by ertl-honda, 9 years ago |
ライブラリとOS及びベーシックなサンプルの追加.
|
File size:
503 bytes
|
Rev | Line | |
---|
[136] | 1 | #include "IRremote.h"
|
---|
| 2 | #include "IRremoteTools.h"
|
---|
| 3 | #include <Arduino.h>
|
---|
| 4 |
|
---|
| 5 | int RECV_PIN = TKD2; // the pin the IR receiver is connected to
|
---|
| 6 | IRrecv irrecv(RECV_PIN); // an instance of the IR receiver object
|
---|
| 7 | decode_results results; // container for received IR codes
|
---|
| 8 |
|
---|
| 9 | void beginIRremote(){
|
---|
| 10 | irrecv.enableIRIn(); // Start the receiver
|
---|
| 11 | }
|
---|
| 12 |
|
---|
| 13 | bool IRrecived(){
|
---|
| 14 | return irrecv.decode(&results);
|
---|
| 15 | }
|
---|
| 16 |
|
---|
| 17 | void resumeIRremote(){
|
---|
| 18 | irrecv.resume(); // resume receiver
|
---|
| 19 | }
|
---|
| 20 |
|
---|
| 21 | unsigned long getIRresult(){
|
---|
| 22 | return results.value;
|
---|
| 23 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.