求Romeo v2红外接收库与范例,谢谢!
2014-04-161.1万
AI 快速预览详细
本文介绍了如何解决在将项目从UNO迁移到Romeo v2时遇到的红外接收报错问题。具体错误为'IRremoteTools.cpp:5: error: 'TKD2' was not declared in this scope'。文章提供了详细的解决步骤和示例代码,帮助用户快速解决问题。通过更新RobotIRremote库并确保包含正确的头文件,可以解决'TKD2'未声明的错误。这对于需要进行红外通信的机器人项目非常实用。
|
求Romeo v2红外接收库与范例,谢谢!原先用UNO的时候,红外接收和发射一切正常,现在换成Romeo v2后,出现C:\Program Files\Arduino\libraries\RobotIRremote\src\IRremoteTools.cpp:5: error: 'TKD2' was not declared in this scope,谢谢帮助! |





此库自身的样例用Arduino UNO和Arduino Leonardo编译通过。
-By default in the UNO board, use the Timer 2 and the pin 3 for IR output.
-By default in the Leonardo board, use the Timer 4 and the pin 13 for IR output.
-If you change the IRremote.h file for use Timer 1 in (__AVR_ATmega32U4__) part the IR output is pin 9.
参考:http://forum.arduino.cc/index.php?topic=122013.0
http://www.righto.com/2009/08/mu ... remote-library.html