介绍
远程遥控技术又称为遥控技术,是指实现对被控目标的遥远控制,在工业控制、航空航天、家电领域应用广泛。红外遥控是一种无线、非接触控制技术,具有抗干扰能力强,信息传输可靠,功耗低,成本低,易实现等显著优点,被诸多电子设备特别是家用电器广泛采用,并越来越多的应用到计算机系统中。
红外遥控测试
连接好电路 打开串口助手,按下遥控上的任意按键,串口显示按下按键的编码。
把 IRremote.rar 解压到 ARDUINO库
可以拿出自己家的遥控,检测遥控的好坏,以及可以检测遥控的编码
使用的元件
1个 红外遥控一体接收头
3根 杜邦线
1片实验板

原理图

连接好线, 下载程序,找出你家的遥控器,电视机,VCD,DVD,空调遥控,风扇遥控,试试吧。

1 连接线。
2 下载ARDUINO程序
3 打开 串口助手
4 找个遥控 对红外一体接收头 按下 , 串口助手就会显示 遥控每个按键的编码。

串口显示 红外编码。

代码:

#include <IRremote.h>int RECV_PIN = 11;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}
}

IRremote.h

/** IRremote* Version 0.1 July, 2009* Copyright 2009 Ken Shirriff* For details, see http://arcfn.com/2009/08/multi-protocol-infrared-remote-library.htm http://arcfn.com** Interrupt code based on NECIRrcv by Joe Knapp* http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1210243556* Also influenced by http://zovirl.com/2008/11/12/building-a-universal-remote-with-an-arduino/*/#ifndef IRremote_h
#define IRremote_h// The following are compile-time library options.
// If you change them, recompile the library.
// If DEBUG is defined, a lot of debugging output will be printed during decoding.
// TEST must be defined for the IRtest unittests to work.  It will make some
// methods virtual, which will be slightly slower, which is why it is optional.
// #define DEBUG
// #define TEST// Results returned from the decoder
class decode_results {
public:int decode_type; // NEC, SONY, RC5, UNKNOWNunsigned long value; // Decoded valueint bits; // Number of bits in decoded valuevolatile unsigned int *rawbuf; // Raw intervals in .5 us ticksint rawlen; // Number of records in rawbuf.
};// Values for decode_type
#define NEC 1
#define SONY 2
#define RC5 3
#define RC6 4
#define UNKNOWN -1// Decoded value for NEC when a repeat code is received
#define REPEAT 0xffffffff// main class for receiving IR
class IRrecv
{
public:IRrecv(int recvpin);void blink13(int blinkflag);int decode(decode_results *results);void enableIRIn();void resume();
private:// These are called by decodeint getRClevel(decode_results *results, int *offset, int *used, int t1);long decodeNEC(decode_results *results);long decodeSony(decode_results *results);long decodeRC5(decode_results *results);long decodeRC6(decode_results *results);
}
;// Only used for testing; can remove virtual for shorter code
#ifdef TEST
#define VIRTUAL virtual
#else
#define VIRTUAL
#endifclass IRsend
{
public:IRsend() {}void sendNEC(unsigned long data, int nbits);void sendSony(unsigned long data, int nbits);void sendRaw(unsigned int buf[], int len, int hz);void sendRC5(unsigned long data, int nbits);void sendRC6(unsigned long data, int nbits);// private:void enableIROut(int khz);VIRTUAL void mark(int usec);VIRTUAL void space(int usec);
}
;// Some useful constants#define USECPERTICK 50  // microseconds per clock interrupt tick
#define RAWBUF 76 // Length of raw duration buffer// Marks tend to be 100us too long, and spaces 100us too short
// when received due to sensor lag.
#define MARK_EXCESS 100#endif

IRremoteInt.h

/** IRremote* Version 0.1 July, 2009* Copyright 2009 Ken Shirriff* For details, see http://arcfn.com/2009/08/multi-protocol-infrared-remote-library.html** Interrupt code based on NECIRrcv by Joe Knapp* http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1210243556* Also influenced by http://zovirl.com/2008/11/12/building-a-universal-remote-with-an-arduino/*/#ifndef IRremoteint_h
#define IRremoteint_h#include "arduino.h"#define CLKFUDGE 5      // fudge factor for clock interrupt overhead
#define CLK 256      // max value for clock (timer 2)
#define PRESCALE 8      // timer2 clock prescale
#define SYSCLOCK 16000000  // main Arduino clock
#define CLKSPERUSEC (SYSCLOCK/PRESCALE/1000000)   // timer clocks per microsecond#define ERR 0
#define DECODED 1#define BLINKLED 13// defines for setting and clearing register bits
#ifndef cbi
#define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit))
#endif
#ifndef sbi
#define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit))
#endif// clock timer reset value
#define INIT_TIMER_COUNT2 (CLK - USECPERTICK*CLKSPERUSEC + CLKFUDGE)
#define RESET_TIMER2 TCNT2 = INIT_TIMER_COUNT2// pulse parameters in usec
#define NEC_HDR_MARK    9000
#define NEC_HDR_SPACE   4500
#define NEC_BIT_MARK    560
#define NEC_ONE_SPACE   1600
#define NEC_ZERO_SPACE  560
#define NEC_RPT_SPACE   2250#define SONY_HDR_MARK   2400
#define SONY_HDR_SPACE  600
#define SONY_ONE_MARK   1200
#define SONY_ZERO_MARK  600
#define SONY_RPT_LENGTH 45000#define RC5_T1     889
#define RC5_RPT_LENGTH  46000#define RC6_HDR_MARK   2666
#define RC6_HDR_SPACE   889
#define RC6_T1      444
#define RC6_RPT_LENGTH  46000#define TOLERANCE 25  // percent tolerance in measurements
#define LTOL (1.0 - TOLERANCE/100.)
#define UTOL (1.0 + TOLERANCE/100.) #define _GAP 5000 // Minimum map between transmissions
#define GAP_TICKS (_GAP/USECPERTICK)#define TICKS_LOW(us) (int) (((us)*LTOL/USECPERTICK))
#define TICKS_HIGH(us) (int) (((us)*UTOL/USECPERTICK + 1))#ifndef DEBUG
#define MATCH(measured_ticks, desired_us) ((measured_ticks) >= TICKS_LOW(desired_us) && (measured_ticks) <= TICKS_HIGH(desired_us))
#define MATCH_MARK(measured_ticks, desired_us) MATCH(measured_ticks, (desired_us) + MARK_EXCESS)
#define MATCH_SPACE(measured_ticks, desired_us) MATCH((measured_ticks), (desired_us) - MARK_EXCESS)
// Debugging versions are in IRremote.cpp
#endif// receiver states
#define STATE_IDLE     2
#define STATE_MARK     3
#define STATE_SPACE    4
#define STATE_STOP     5// information for the interrupt handler
typedef struct {uint8_t recvpin;           // pin for IR data from detectoruint8_t rcvstate;          // state machineuint8_t blinkflag;         // TRUE to enable blinking of pin 13 on IR processingunsigned int timer;     // state timer, counts 50uS ticks.unsigned int rawbuf[RAWBUF]; // raw datauint8_t rawlen;         // counter of entries in rawbuf
}
irparams_t;// Defined in IRremote.cpp
extern volatile irparams_t irparams;// IR detector output is active low
#define MARK  0
#define SPACE 1#define TOPBIT 0x80000000#define NEC_BITS 32
#define SONY_BITS 12
#define MIN_RC5_SAMPLES 11
#define MIN_RC6_SAMPLES 1#endif

IRremote.cpp

/** IRremote* Version 0.11 August, 2009* Copyright 2009 Ken Shirriff* For details, see http://arcfn.com/2009/08/multi-protocol-infrared-remote-library.html** Interrupt code based on NECIRrcv by Joe Knapp* http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1210243556* Also influenced by http://zovirl.com/2008/11/12/building-a-universal-remote-with-an-arduino/*/#include "IRremote.h"
#include "IRremoteInt.h"// Provides ISR
#include <avr/interrupt.h>volatile irparams_t irparams;// These versions of MATCH, MATCH_MARK, and MATCH_SPACE are only for debugging.
// To use them, set DEBUG in IRremoteInt.h
// Normally macros are used for efficiency
#ifdef DEBUG
int MATCH(int measured, int desired) {Serial.print("Testing: ");Serial.print(TICKS_LOW(desired), DEC);Serial.print(" <= ");Serial.print(measured, DEC);Serial.print(" <= ");Serial.println(TICKS_HIGH(desired), DEC);return measured >= TICKS_LOW(desired) && measured <= TICKS_HIGH(desired);
}int MATCH_MARK(int measured_ticks, int desired_us) {Serial.print("Testing mark ");Serial.print(measured_ticks * USECPERTICK, DEC);Serial.print(" vs ");Serial.print(desired_us, DEC);Serial.print(": ");Serial.print(TICKS_LOW(desired_us + MARK_EXCESS), DEC);Serial.print(" <= ");Serial.print(measured_ticks, DEC);Serial.print(" <= ");Serial.println(TICKS_HIGH(desired_us + MARK_EXCESS), DEC);return measured_ticks >= TICKS_LOW(desired_us + MARK_EXCESS) && measured_ticks <= TICKS_HIGH(desired_us + MARK_EXCESS);
}int MATCH_SPACE(int measured_ticks, int desired_us) {Serial.print("Testing space ");Serial.print(measured_ticks * USECPERTICK, DEC);Serial.print(" vs ");Serial.print(desired_us, DEC);Serial.print(": ");Serial.print(TICKS_LOW(desired_us - MARK_EXCESS), DEC);Serial.print(" <= ");Serial.print(measured_ticks, DEC);Serial.print(" <= ");Serial.println(TICKS_HIGH(desired_us - MARK_EXCESS), DEC);return measured_ticks >= TICKS_LOW(desired_us - MARK_EXCESS) && measured_ticks <= TICKS_HIGH(desired_us - MARK_EXCESS);
}
#endifvoid IRsend::sendNEC(unsigned long data, int nbits)
{enableIROut(38);mark(NEC_HDR_MARK);space(NEC_HDR_SPACE);for (int i = 0; i < nbits; i++) {if (data & TOPBIT) {mark(NEC_BIT_MARK);space(NEC_ONE_SPACE);} else {mark(NEC_BIT_MARK);space(NEC_ZERO_SPACE);}data <<= 1;}mark(NEC_BIT_MARK);space(0);
}void IRsend::sendSony(unsigned long data, int nbits) {enableIROut(40);mark(SONY_HDR_MARK);space(SONY_HDR_SPACE);data = data << (32 - nbits);for (int i = 0; i < nbits; i++) {if (data & TOPBIT) {mark(SONY_ONE_MARK);space(SONY_HDR_SPACE);} else {mark(SONY_ZERO_MARK);space(SONY_HDR_SPACE);}data <<= 1;}
}void IRsend::sendRaw(unsigned int buf[], int len, int hz)
{enableIROut(hz);for (int i = 0; i < len; i++) {if (i & 1) {space(buf[i]);} else {mark(buf[i]);}}space(0); // Just to be sure
}// Note: first bit must be a one (start bit)
void IRsend::sendRC5(unsigned long data, int nbits)
{enableIROut(36);data = data << (32 - nbits);mark(RC5_T1); // First start bitspace(RC5_T1); // Second start bitmark(RC5_T1); // Second start bitfor (int i = 0; i < nbits; i++) {if (data & TOPBIT) {space(RC5_T1); // 1 is space, then markmark(RC5_T1);} else {mark(RC5_T1);space(RC5_T1);}data <<= 1;}space(0); // Turn off at end
}// Caller needs to take care of flipping the toggle bit
void IRsend::sendRC6(unsigned long data, int nbits)
{enableIROut(36);data = data << (32 - nbits);mark(RC6_HDR_MARK);space(RC6_HDR_SPACE);mark(RC6_T1); // start bitspace(RC6_T1);int t;for (int i = 0; i < nbits; i++) {if (i == 3) {// double-wide trailer bitt = 2 * RC6_T1;} else {t = RC6_T1;}if (data & TOPBIT) {mark(t);space(t);} else {space(t);mark(t);}data <<= 1;}space(0); // Turn off at end
}void IRsend::mark(int time) {// Sends an IR mark for the specified number of microseconds.// The mark output is modulated at the PWM frequency.TCCR2A |= _BV(COM2B1); // Enable pin 3 PWM outputdelayMicroseconds(time);
}/* Leave pin off for time (given in microseconds) */
void IRsend::space(int time) {// Sends an IR space for the specified number of microseconds.// A space is no output, so the PWM output is disabled.TCCR2A &= ~(_BV(COM2B1)); // Disable pin 3 PWM outputdelayMicroseconds(time);
}void IRsend::enableIROut(int khz) {// Enables IR output.  The khz value controls the modulation frequency in kilohertz.// The IR output will be on pin 3 (OC2B).// This routine is designed for 36-40KHz; if you use it for other values, it's up to you// to make sure it gives reasonable results.  (Watch out for overflow / underflow / rounding.)// TIMER2 is used in phase-correct PWM mode, with OCR2A controlling the frequency and OCR2B// controlling the duty cycle.// There is no prescaling, so the output frequency is 16MHz / (2 * OCR2A)// To turn the output on and off, we leave the PWM running, but connect and disconnect the output pin.// A few hours staring at the ATmega documentation and this will all make sense.// See my Secrets of Arduino PWM at http://arcfn.com/2009/07/secrets-of-arduino-pwm.html for details.// Disable the Timer2 Interrupt (which is used for receiving IR)TIMSK2 &= ~_BV(TOIE2); //Timer2 Overflow InterruptpinMode(3, OUTPUT);digitalWrite(3, LOW); // When not sending PWM, we want it low// COM2A = 00: disconnect OC2A// COM2B = 00: disconnect OC2B; to send signal set to 10: OC2B non-inverted// WGM2 = 101: phase-correct PWM with OCRA as top// CS2 = 000: no prescalingTCCR2A = _BV(WGM20);TCCR2B = _BV(WGM22) | _BV(CS20);// The top value for the timer.  The modulation frequency will be SYSCLOCK / 2 / OCR2A.OCR2A = SYSCLOCK / 2 / khz / 1000;OCR2B = OCR2A / 3; // 33% duty cycle
}IRrecv::IRrecv(int recvpin)
{irparams.recvpin = recvpin;irparams.blinkflag = 0;
}// initialization
void IRrecv::enableIRIn() {// setup pulse clock timer interruptTCCR2A = 0;  // normal mode//Prescale /8 (16M/8 = 0.5 microseconds per tick)// Therefore, the timer interval can range from 0.5 to 128 microseconds// depending on the reset value (255 to 0)cbi(TCCR2B,CS22);sbi(TCCR2B,CS21);cbi(TCCR2B,CS20);//Timer2 Overflow Interrupt Enablesbi(TIMSK2,TOIE2);RESET_TIMER2;sei();  // enable interrupts// initialize state machine variablesirparams.rcvstate = STATE_IDLE;irparams.rawlen = 0;// set pin modespinMode(irparams.recvpin, INPUT);
}// enable/disable blinking of pin 13 on IR processing
void IRrecv::blink13(int blinkflag)
{irparams.blinkflag = blinkflag;if (blinkflag)pinMode(BLINKLED, OUTPUT);
}// TIMER2 interrupt code to collect raw data.
// Widths of alternating SPACE, MARK are recorded in rawbuf.
// Recorded in ticks of 50 microseconds.
// rawlen counts the number of entries recorded so far.
// First entry is the SPACE between transmissions.
// As soon as a SPACE gets long, ready is set, state switches to IDLE, timing of SPACE continues.
// As soon as first MARK arrives, gap width is recorded, ready is cleared, and new logging starts
ISR(TIMER2_OVF_vect)
{RESET_TIMER2;uint8_t irdata = (uint8_t)digitalRead(irparams.recvpin);irparams.timer++; // One more 50us tickif (irparams.rawlen >= RAWBUF) {// Buffer overflowirparams.rcvstate = STATE_STOP;}switch(irparams.rcvstate) {case STATE_IDLE: // In the middle of a gapif (irdata == MARK) {if (irparams.timer < GAP_TICKS) {// Not big enough to be a gap.irparams.timer = 0;} else {// gap just ended, record duration and start recording transmissionirparams.rawlen = 0;irparams.rawbuf[irparams.rawlen++] = irparams.timer;irparams.timer = 0;irparams.rcvstate = STATE_MARK;}}break;case STATE_MARK: // timing MARKif (irdata == SPACE) {   // MARK ended, record timeirparams.rawbuf[irparams.rawlen++] = irparams.timer;irparams.timer = 0;irparams.rcvstate = STATE_SPACE;}break;case STATE_SPACE: // timing SPACEif (irdata == MARK) { // SPACE just ended, record itirparams.rawbuf[irparams.rawlen++] = irparams.timer;irparams.timer = 0;irparams.rcvstate = STATE_MARK;} else { // SPACEif (irparams.timer > GAP_TICKS) {// big SPACE, indicates gap between codes// Mark current code as ready for processing// Switch to STOP// Don't reset timer; keep counting space widthirparams.rcvstate = STATE_STOP;} }break;case STATE_STOP: // waiting, measuring gapif (irdata == MARK) { // reset gap timerirparams.timer = 0;}break;}if (irparams.blinkflag) {if (irdata == MARK) {PORTB |= B00100000;  // turn pin 13 LED on} else {PORTB &= B11011111;  // turn pin 13 LED off}}
}void IRrecv::resume() {irparams.rcvstate = STATE_IDLE;irparams.rawlen = 0;
}// Decodes the received IR message
// Returns 0 if no data ready, 1 if data ready.
// Results of decoding are stored in results
int IRrecv::decode(decode_results *results) {results->rawbuf = irparams.rawbuf;results->rawlen = irparams.rawlen;if (irparams.rcvstate != STATE_STOP) {return ERR;}
#ifdef DEBUGSerial.println("Attempting NEC decode");
#endifif (decodeNEC(results)) {return DECODED;}
#ifdef DEBUGSerial.println("Attempting Sony decode");
#endifif (decodeSony(results)) {return DECODED;}
#ifdef DEBUGSerial.println("Attempting RC5 decode");
#endif  if (decodeRC5(results)) {return DECODED;}
#ifdef DEBUGSerial.println("Attempting RC6 decode");
#endif if (decodeRC6(results)) {return DECODED;}if (results->rawlen >= 6) {// Only return raw buffer if at least 6 bitsresults->decode_type = UNKNOWN;results->bits = 0;results->value = 0;return DECODED;}// Throw away and start overresume();return ERR;
}long IRrecv::decodeNEC(decode_results *results) {long data = 0;int offset = 1; // Skip first space// Initial markif (!MATCH_MARK(results->rawbuf[offset], NEC_HDR_MARK)) {return ERR;}offset++;// Check for repeatif (irparams.rawlen == 4 &&MATCH_SPACE(results->rawbuf[offset], NEC_RPT_SPACE) &&MATCH_MARK(results->rawbuf[offset+1], NEC_BIT_MARK)) {results->bits = 0;results->value = REPEAT;results->decode_type = NEC;return DECODED;}if (irparams.rawlen < 2 * NEC_BITS + 4) {return ERR;}// Initial space  if (!MATCH_SPACE(results->rawbuf[offset], NEC_HDR_SPACE)) {return ERR;}offset++;for (int i = 0; i < NEC_BITS; i++) {if (!MATCH_MARK(results->rawbuf[offset], NEC_BIT_MARK)) {return ERR;}offset++;if (MATCH_SPACE(results->rawbuf[offset], NEC_ONE_SPACE)) {data = (data << 1) | 1;} else if (MATCH_SPACE(results->rawbuf[offset], NEC_ZERO_SPACE)) {data <<= 1;} else {return ERR;}offset++;}// Successresults->bits = NEC_BITS;results->value = data;results->decode_type = NEC;return DECODED;
}long IRrecv::decodeSony(decode_results *results) {long data = 0;if (irparams.rawlen < 2 * SONY_BITS + 2) {return ERR;}int offset = 1; // Skip first space// Initial markif (!MATCH_MARK(results->rawbuf[offset], SONY_HDR_MARK)) {return ERR;}offset++;while (offset + 1 < irparams.rawlen) {if (!MATCH_SPACE(results->rawbuf[offset], SONY_HDR_SPACE)) {break;}offset++;if (MATCH_MARK(results->rawbuf[offset], SONY_ONE_MARK)) {data = (data << 1) | 1;} else if (MATCH_MARK(results->rawbuf[offset], SONY_ZERO_MARK)) {data <<= 1;} else {return ERR;}offset++;}// Successresults->bits = (offset - 1) / 2;if (results->bits < 12) {results->bits = 0;return ERR;}results->value = data;results->decode_type = SONY;return DECODED;
}// Gets one undecoded level at a time from the raw buffer.
// The RC5/6 decoding is easier if the data is broken into time intervals.
// E.g. if the buffer has MARK for 2 time intervals and SPACE for 1,
// successive calls to getRClevel will return MARK, MARK, SPACE.
// offset and used are updated to keep track of the current position.
// t1 is the time interval for a single bit in microseconds.
// Returns -1 for error (measured time interval is not a multiple of t1).
int IRrecv::getRClevel(decode_results *results, int *offset, int *used, int t1) {if (*offset >= results->rawlen) {// After end of recorded buffer, assume SPACE.return SPACE;}int width = results->rawbuf[*offset];int val = ((*offset) % 2) ? MARK : SPACE;int correction = (val == MARK) ? MARK_EXCESS : - MARK_EXCESS;int avail;if (MATCH(width, t1 + correction)) {avail = 1;} else if (MATCH(width, 2*t1 + correction)) {avail = 2;} else if (MATCH(width, 3*t1 + correction)) {avail = 3;} else {return -1;}(*used)++;if (*used >= avail) {*used = 0;(*offset)++;}
#ifdef DEBUGif (val == MARK) {Serial.println("MARK");} else {Serial.println("SPACE");}
#endifreturn val;
}long IRrecv::decodeRC5(decode_results *results) {if (irparams.rawlen < MIN_RC5_SAMPLES + 2) {return ERR;}int offset = 1; // Skip gap spacelong data = 0;int used = 0;// Get start bitsif (getRClevel(results, &offset, &used, RC5_T1) != MARK) return ERR;if (getRClevel(results, &offset, &used, RC5_T1) != SPACE) return ERR;if (getRClevel(results, &offset, &used, RC5_T1) != MARK) return ERR;int nbits;for (nbits = 0; offset < irparams.rawlen; nbits++) {int levelA = getRClevel(results, &offset, &used, RC5_T1); int levelB = getRClevel(results, &offset, &used, RC5_T1);if (levelA == SPACE && levelB == MARK) {// 1 bitdata = (data << 1) | 1;} else if (levelA == MARK && levelB == SPACE) {// zero bitdata <<= 1;} else {return ERR;} }// Successresults->bits = nbits;results->value = data;results->decode_type = RC5;return DECODED;
}long IRrecv::decodeRC6(decode_results *results) {if (results->rawlen < MIN_RC6_SAMPLES) {return ERR;}int offset = 1; // Skip first space// Initial markif (!MATCH_MARK(results->rawbuf[offset], RC6_HDR_MARK)) {return ERR;}offset++;if (!MATCH_SPACE(results->rawbuf[offset], RC6_HDR_SPACE)) {return ERR;}offset++;long data = 0;int used = 0;// Get start bit (1)if (getRClevel(results, &offset, &used, RC6_T1) != MARK) return ERR;if (getRClevel(results, &offset, &used, RC6_T1) != SPACE) return ERR;int nbits;for (nbits = 0; offset < results->rawlen; nbits++) {int levelA, levelB; // Next two levelslevelA = getRClevel(results, &offset, &used, RC6_T1); if (nbits == 3) {// T bit is double wide; make sure second half matchesif (levelA != getRClevel(results, &offset, &used, RC6_T1)) return ERR;} levelB = getRClevel(results, &offset, &used, RC6_T1);if (nbits == 3) {// T bit is double wide; make sure second half matchesif (levelB != getRClevel(results, &offset, &used, RC6_T1)) return ERR;} if (levelA == MARK && levelB == SPACE) { // reversed compared to RC5// 1 bitdata = (data << 1) | 1;} else if (levelA == SPACE && levelB == MARK) {// zero bitdata <<= 1;} else {return ERR; // Error} }// Successresults->bits = nbits;results->value = data;results->decode_type = RC6;return DECODED;
}

keywords.txt

#######################################
# Syntax Coloring Map For IRremote
##############################################################################
# Datatypes (KEYWORD1)
#######################################decode_results KEYWORD1
IRrecv KEYWORD1
IRsend KEYWORD1#######################################
# Methods and Functions (KEYWORD2)
#######################################blink13 KEYWORD2
decode KEYWORD2
enableIRIn KEYWORD2
resume KEYWORD2
enableIROut KEYWORD2
sendNEC KEYWORD2
sendSony KEYWORD2
sendRaw KEYWORD2
sendRC5 KEYWORD2
sendRC6 KEYWORD2
#
#######################################
# Constants (LITERAL1)
#######################################NEC LITERAL1
SONY LITERAL1
RC5 LITERAL1
RC6 LITERAL1
UNKNOWN LITERAL1
REPEAT LITERAL1

arduino学习笔记十八--红外遥控检测相关推荐

  1. windows内核开发学习笔记十八:IRP 处理的标准模式

    windows内核开发学习笔记十八:IRP 处理的标准模式 在 Windows 内核中的请求基本上是通过 I/O Request Packet 完成的. I/O manager ---> Dis ...

  2. python3.4学习笔记(十八) pycharm 安装使用、注册码、显示行号和字体大小等常用设置...

    python3.4学习笔记(十八) pycharm 安装使用.注册码.显示行号和字体大小等常用设置 Download JetBrains Python IDE :: PyCharm http://ww ...

  3. Polyworks脚本开发学习笔记(十八)-用SDK开发Polyworks插件

    Polyworks脚本开发学习笔记(十八)-用SDK开发Polyworks插件 插件是由PolyWorks加载的动态链接库(DLL文件),然后查询Polyworks模块,以确定它们具有哪些功能,提供给 ...

  4. 学习笔记(十八):MoRe-Fi用深度学习网络从非线性信号中恢复呼吸波形

    <MoRe-Fi: Motion-robust and Fine-grained Respiration Monitoring via Deep-Learning UWB Radar>学习 ...

  5. 【D3D11游戏编程】学习笔记十八:模板缓冲区的使用、镜子的实现

    (注:[D3D11游戏编程]学习笔记系列由CSDN作者BonChoix所写,转载请注明出处:http://blog.csdn.net/BonChoix,谢谢~) 模板缓冲区(Stencil Buffe ...

  6. three.js学习笔记(十八)——调整材质

    介绍 到现在为止,我们都在创建新的着色器材质,但是如果我们想要修改一个Three.js内置的材质呢?或许我们对MeshStandardMaterial的处理结果感到满意,但是希望往里边添加顶点动画. ...

  7. arduino学习笔记十--Arduino 读红外测距传感器

    Arduino 读红外测距传感器GP2D12 实例,仅供大家参考! 器材:Arduino 开发板,GP2D12,1602 字符液晶,连接线若干. GP2D12 是日本SHARP 公司生产的红外距离传感 ...

  8. 【Arduino学习笔记】E18-D50NK红外避障传感器使用说明

    网上淘的E18-D50NK到货了,闲着没事试了一下,顺便做个笔记 就是这货,红色接5V正极,绿色接GND,黄色为信号线 后面的小圆孔可以调节有效检测距离 arduino代码如下: int E18Pin ...

  9. K210学习笔记(八)——人脸检测和人脸识别

    前言 人脸检测是人脸识别算法的第一步,人脸识别过程主要分为人脸图像获取.人脸检测.人脸配准.人脸表征以及人脸图像匹配与识别.人脸检测的目标是找出图像中所有的人脸对应的位置,算法的输出是人脸外接矩形(椭 ...

最新文章

  1. Docker的原理及特性介绍
  2. 集成运算同相放大器和反向放大器的选择
  3. testng入门_单元测试
  4. matlab-画图函数:scatter和plot
  5. InfluxData【环境搭建 01】时序数据库 InfluxDB 最新版本安装启动验证(在线安装+离线安装及各版本下载地址)
  6. 公司6:JrVue重用布局
  7. jsp中两个double相乘_图像处理中的代数运算及几何变换
  8. 风控扫盲:巴塞尔下的分池与量化风控岗
  9. Unity 基础 之 Camera摄像机属性介绍
  10. eova(JFinal)项目一键式部署方法
  11. LDA(Latent Dirichlet Allocation)主题模型
  12. 计算机密码无法输完整,笔记本电脑键盘失灵无法输入密码怎么解决
  13. python连接sftp下载文件及文件夹
  14. C# WinForm GUI之控件
  15. Win10系统此电脑隐藏特定文件夹
  16. UE5 学习2- 快捷键
  17. 第三届搜狐校园算法大赛开赛!
  18. 【项目】工艺品展示系统——数据库设计
  19. 集美大学计算机工程学院考研科目,集美大学考研专业目录
  20. 外汇/本币;结算/清算

热门文章

  1. linux who命令详解,Linux who命令实例详解
  2. idea maven子项目图标右下角没有小蓝方块
  3. 苹果电脑重置登录密码
  4. 2021年煤气考试内容及煤气找解析
  5. 实录:HBA卡速率设置错误导致服务器无法识别存储
  6. java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
  7. 【电影】小萝莉的猴神大叔
  8. CSS通用样式2——Flex布局
  9. 键盘按d就计算机,电脑为什么一按D就返回桌面?一按M也回桌面、按L直接待机了?:excle按d就返回桌面...
  10. 解决Apple Watch 更新时出现红色感叹号「!」的问题