Lab_interaccio/2012/ir_test/ir_test.pde

19 lines
317 B
Plaintext
Raw Permalink Normal View History

2025-02-25 21:29:42 +01:00
#include "IRremote.h"
int RECV_PIN = 9;
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
}
}