Skip to content

Instantly share code, notes, and snippets.

@YDKK YDKK/IR Receive.c
Last active Nov 14, 2017

What would you like to do?
#include <IRremote.h>
int RECV_PIN = 11;
IRrecv irrecv(RECV_PIN);
decode_results results;
void setup()
irrecv.enableIRIn(); // Start the receiver
void dump(decode_results *results) {
int count = results->rawlen;
Serial.print("Raw (");
Serial.print(count, DEC);
Serial.print("): ");
for (int i = 0; i < count; i++) {
Serial.print(results->rawbuf[i]*USECPERTICK, DEC);
Serial.print(" ");
void loop() {
if (irrecv.decode(&results)) {
irrecv.resume(); // Receive the next value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.