Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
45 lines (34 sloc) 1.22 KB
This is an example for the Adafruit NEC Remote Control
Designed specifically to work with the Adafruit NEC Remote Control
and IR Receiver Sensor
These devices use IR to communicate, 1 pin is required to
Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
products from Adafruit!
Written by Limor Fried/Ladyada for Adafruit Industries.
BSD license, all text above must be included in any redistribution
#if ARDUINO >= 100
#include "Arduino.h"
#include "WProgram.h"
// what our timing resolution should be, larger is better
// as its more 'precise' - but too large and you wont get
// accurate timing
#define RESOLUTION 20
class Adafruit_NECremote {
Adafruit_NECremote(uint8_t pin);
int16_t listen(int16_t maxwaitseconds = 0);
uint8_t _irpin, _irpinport, _irpinmask;
boolean timedout, timing;
int32_t maxwaiting;
uint16_t measurePulse(boolean state);
uint8_t readNECbit();
Something went wrong with that request. Please try again.