赤外線リモコンのパルス幅を表示します
Dependencies: mbed IRRcevPulseWidth
Fork of irreceiver by
Revision 5:6cd0d9c1a0a3, committed 2016-12-30
- Comitter:
- nameless129
- Date:
- Fri Dec 30 04:57:50 2016 +0000
- Parent:
- 4:0371cd0e5be3
- Commit message:
- add filter function
Changed in this revision
IRRcevPulseWidth.lib | Show annotated file Show diff for this revision Revisions of this file |
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 0371cd0e5be3 -r 6cd0d9c1a0a3 IRRcevPulseWidth.lib --- a/IRRcevPulseWidth.lib Sun Dec 25 09:03:02 2016 +0000 +++ b/IRRcevPulseWidth.lib Fri Dec 30 04:57:50 2016 +0000 @@ -1,1 +1,1 @@ -https://developer.mbed.org/users/nameless129/code/IRRcevPulseWidth/#612202986301 +https://developer.mbed.org/users/nameless129/code/IRRcevPulseWidth/#674f9ea95a5a
diff -r 0371cd0e5be3 -r 6cd0d9c1a0a3 main.cpp --- a/main.cpp Sun Dec 25 09:03:02 2016 +0000 +++ b/main.cpp Fri Dec 30 04:57:50 2016 +0000 @@ -1,7 +1,7 @@ #include "mbed.h" #include "IRRcevPulseWidth.h" -#define IR_RCEV_MAX_IR_RECEV_NUM (300) +#define IR_RCEV_MAX_IR_RECEV_NUM (600) #define IR_RCEV_TIMEOUT_US (100000) Serial g_serial(USBTX, USBRX); @@ -14,6 +14,7 @@ int8_t ret; IRrcev.init(IR_RcevData,IR_RCEV_MAX_IR_RECEV_NUM,IR_RCEV_TIMEOUT_US); + IRrcev.setPulseNumFilter(10); while(1) {