无法理解Raw IR Code

时间:2016-11-24 07:05:13

标签: arduino iot esp8266 infrared arduino-esp8266

我正在使用arduino开发基于IR的远程控制应用程序。经过长时间的探索,我发现很少的Raw Ir代码,看起来像 -

"IR": "40064,1,1,96,24,24,24,48,24,24,24,24,24,48,24,24,24,24,24,48,24,24,24,24,24,24,24,24,1057,96,24,24,24,48,24,24,24,24,24,48,24,24,24,24,24,48,24,24,24,24,24,24,24,24,1057,96,24,24,24,48,24,24,24,24,24,48,24,24,24,24,24,48,24,24,24,24,24,24,24,24,5128"
enter code here

很难过,即使在获得此代码后我也无法理解此代码,我正在使用此aruino库 - https://github.com/z3t0/Arduino-IRremote

发送原始代码的地方是这样的 -

void  IRsend::sendRaw (const unsigned int buf[],  unsigned int len,  unsigned int hz){
// Set IR carrier frequency
enableIROut(hz);

for (unsigned int i = 0;  i < len;  i++) {
    if (i & 1)  space(buf[i]) ;
    else        mark (buf[i]) ;
}

space(0);  // Always end with the LED off
}

其中buf是一个包含微秒间隔的数组,在此期间信号将为低或高。 但我上面提到的IR代码并不起作用,因为我认为它没有时间间隔而是其他东西。任何领导都会很优雅。

0 个答案:

没有答案