Skip to content
Snippets Groups Projects
Commit a606c903 authored by Orhan-Timo Altan's avatar Orhan-Timo Altan
Browse files

.

parent 56f89f34
No related branches found
No related tags found
No related merge requests found
...@@ -30,12 +30,14 @@ ...@@ -30,12 +30,14 @@
* ****************************************** */ * ****************************************** */
#define IR_USE_AVR_TIMER3 #define IR_USE_AVR_TIMER3
#include <IRremote.h> #include <IRremote.h>
IRrecv ir_reciver(IR_PIN);
decode_results results;
class BitsIrReciver class BitsIrReciver
{ {
public: public:
BitsIrReciver(int aPin){
IRrecv ir_reciver(aPin);
};
void begin() void begin()
{ {
ir_reciver.enableIRIn(); ir_reciver.enableIRIn();
...@@ -56,6 +58,7 @@ public: ...@@ -56,6 +58,7 @@ public:
}; };
private: private:
IRrecv ir_reciver;
int ir_command; int ir_command;
}; };
......
...@@ -19,7 +19,7 @@ Sie dient als erleichterte Bedienung der IRRemote.h Bibliothek. ...@@ -19,7 +19,7 @@ Sie dient als erleichterte Bedienung der IRRemote.h Bibliothek.
## **Voraussetzung** ## **Voraussetzung**
- Die angepasste IRRemote Bibliothek in der **customized_library.zip** muss in das Libraries-Verzeichnis der Arduino-IDE kopiert werden. - [IRremote](https://github.com/Arduino-IRremote/Arduino-IRremote) by shirriff
## **Installation** ## **Installation**
...@@ -35,7 +35,7 @@ Zur Verwendung siehe zunächst das Beispiel `IRReciver.ino` ...@@ -35,7 +35,7 @@ Zur Verwendung siehe zunächst das Beispiel `IRReciver.ino`
**Instanziieren:** **Instanziieren:**
`BitsIrReciver ir_sensor;` `BitsIrReciver ir_sensor(IR_PIN);`
**Aufrufen der Methoden:** **Aufrufen der Methoden:**
- Um den IR-Empfänger zu initialisieren wird folgende Methode im `void setup()` ausgeführt: `ir_sensor.begin()` - Um den IR-Empfänger zu initialisieren wird folgende Methode im `void setup()` ausgeführt: `ir_sensor.begin()`
......
File deleted
#define IR_PIN 46
#include "BITsIRReciver.h" #include "BITsIRReciver.h"
BitsIrReciver ir_sensor; #define IR_PIN 46
BitsIrReciver ir_sensor(IR_PIN);
int command; int command;
void setup(){ void setup(){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment