Arduino IRremote库无法摇控电视
在Raspberry上尝试过lirc来控制sony电视,使用的配置是RM-V310,http://lirc.sourceforge.net/remotes/sony/RM-V310,试用了一下,是可以控制电视(Sony)的声音增加和减少。在Arduino上使用IRremote库来dump了一下vol-,编码是C90,但是通过irsendSony来控制,电视没有反应,程序很简单,就是IRremote库的sendDemo
#include <IRremote.h>
IRsend irsend;
void setup()
{
Serial.begin(9600);
}
void loop() {
if (Serial.read() != -1) {
for (int i = 0; i < 3; i++) {
irsend.sendSony(0xC90, 12); // Sony TV vol- code
delay(40);
}
}
}
看了很多的贴子也没太搞明白是怎么回事,看了有的贴子是说delay(40)中的40可以改一下,我自己人1试到了100,还是不能正常,电视一直没有反应。 irsend.sendSony(0xC90, 12);
其中的12数值是不是dump出来的? xiaoesky 发表于 2014-7-31 09:42
irsend.sendSony(0xC90, 12);
其中的12数值是不是dump出来的?
是的,dump出来也是这个,对比lirc的配置文件,也是这个。
页:
[1]