22-11-2015, 14:37
(Ten post był ostatnio modyfikowany: 22-11-2015, 16:31 przez CEO.
Powód edycji: Używamy znaczników kodu
)
(12-11-2015, 20:45)JasQ napisał(a): Cześć.
TKD2 nie jest zadeklarowany w programie daj pełny kod to pomożemy
Kod:
#include <IRremote.h>
#include <IRremoteInt.h>
#include <IRremoteTools.h>
/*
* IRremote: IRrecvDemo - demonstrates receiving IR codes with IRrecv
* An IR detector/demodulator must be connected to the input RECV_PIN.
* Version 0.1 July, 2009
* Copyright 2009 Ken Shirriff
* http://arcfn.com
*/
#include <IRremote.h>
int RECV_PIN = 7;
IRrecv irrecv(RECV_PIN);
decode_results results;
void setup()
{
Serial.begin(9600);
irrecv.enableIRIn(); // Start the receiver
}
void loop() {
if (irrecv.decode(&results)) {
Serial.println(results.value, HEX);
irrecv.resume(); // Receive the next value
}
delay(100);
}