Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
thk_ir_receiver
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
thk_libs
microcontrollers
thk_ir_receiver
Commits
e35d444e
Commit
e35d444e
authored
3 years ago
by
Orhan-Timo Altan
Browse files
Options
Downloads
Patches
Plain Diff
v1.0
parent
9efe322c
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
BITsIRReciver.h
+67
-0
67 additions, 0 deletions
BITsIRReciver.h
README.md
+3
-1
3 additions, 1 deletion
README.md
examples/IRReciver/IRReciver.ino
+16
-0
16 additions, 0 deletions
examples/IRReciver/IRReciver.ino
with
86 additions
and
1 deletion
BITsIRReciver.h
0 → 100644
+
67
−
0
View file @
e35d444e
#ifndef BITSIIRRECIVER_H
#define BITSIIRRECIVER_H
/* ********************************************** *
* IR Remote *
* *
* Button | Signal Kodierung *
* ---------------------------------------------- *
* Power Button | 69 *
* VOL+ Button | 70 *
* Func Button | 71 *
* Rewind Button | 68 *
* Play/Pause Button | 64 *
* Forward Button | 67 *
* Down Button | 7 *
* VOL- Button | 21 *
* UP Button | 9 *
* 0 Button | 22 *
* EQ Button | 25 *
* ST/REPT Button | 13 *
* 1 Button | 12 *
* 2 Button | 24 *
* 3 Button | 94 *
* 4 Button | 8 *
* 5 Button | 28 *
* 6 Button | 90 *
* 7 Button | 66 *
* 8 Button | 82 *
* 9 Button | 74 *
* ********************************************** */
#include
<IRremote.h>
// #define IR_USE_AVR_TIMER3
const
int
irReceiverPin
=
2
;
IRrecv
irrecv
(
irReceiverPin
);
decode_results
results
;
// Liste von oben nach unten sortiert
int
commandlist
[
21
]
=
{
69
,
70
,
71
,
68
,
64
,
67
,
7
,
21
,
9
,
22
,
25
,
13
,
12
,
24
,
94
,
8
,
28
,
90
,
66
,
82
,
74
};
class
BITsIRReciver
{
public:
void
init
(){
irrecv
.
enableIRIn
();
};
int
ir_recv
(){
//if the ir receiver module receiver data
if
(
irrecv
.
decode
())
{
ir_command
=
irrecv
.
decodedIRData
.
command
;
// Receive the next value
irrecv
.
resume
();
for
(
int
i
=
0
;
i
<
21
;
i
++
)
{
if
(
ir_command
==
commandlist
[
i
])
{
ir_command_pos
=
i
;
break
;
}
}
return
ir_command_pos
;
}
};
private
:
int
ir_command
;
int
ir_command_pos
;
};
#endif
\ No newline at end of file
This diff is collapsed.
Click to expand it.
README.md
+
3
−
1
View file @
e35d444e
# BITs IR Empfänger
# **BITs IR Empfänger**
This diff is collapsed.
Click to expand it.
examples/IRReciver/IRReciver.ino
0 → 100644
+
16
−
0
View file @
e35d444e
#include
"BITsIRReciver.h"
BITsIRReciver
bIRrec
;
int
command_index
;
void
setup
(){
Serial
.
begin
(
115200
);
bIRrec
.
init
();
}
void
loop
(){
command_index
=
bIRrec
.
ir_recv
();
Serial
.
println
(
command_index
);
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment