Hey guys!
I've bought an infrared-keyboard. (IRMP – Mikrocontroller.net)
However, i have several problems in translating the protocol because the IRMP library was not programmed for Arduinos.
For all other remotes I use the IRremote-library, which gives me only the microsecond-distances:
#include <IRremote.h>
IRrecv irrecv(3);
decode_results results;
void setup() {
Serial.begin(9600);
irrecv.enableIRIn();
}
void loop() {
if (irrecv.decode(&results)) {
dump(&results);
irrecv.resume();
}
}
void dump(decode_results *results) {
int count = results->rawlen;
for (int i = 0; i < count; i++) {
Serial.print(results->rawbuf[i] * USECPERTICK, DEC);
Serial.print(" ");
}
Serial.println("");
}
44126 2100 950 300 700 350 650 350 700 300 700 300 700 350 700 300 200 350 150 350 200 300 200 350 200 300 200 350 150 350 200 300 200 350 200 300 200 350 200 300 200 350 150 350 200 300 200 350 200 300 200 350 650 350 700 300 200 350 150 350 200 300 700 350 200 300 200 350 150 350 200 300 700 350 650 350
Can someone give me a nudge in the right direction?