所以这就是现在发生的事情,我正在使用URG激光传感器的代码,我正在尝试在Arduino软件中编译它以查看它是否可以进行测试。但是当我单击“编译”时,会显示以下错误消息:
In file included from /home/hadoop/sketchbook/libraries/urg/urg_connection.h:17:0,
from /home/hadoop/sketchbook/libraries/urg/urg_sensor.h:15,
from Laser_hpp.ino:4:
/home/hadoop/sketchbook/libraries/urg/urg_serial.h:22:21: fatal error: termios.h: No such file or directory
#include <termios.h>
^
compilation terminated.
我下载了我为Ubuntu Linux找到的所有termios库,但它仍然给我错误。我找到的库我复制到了urg_sensor.h文件所在的位置,但是它不起作用。
我尝试通过以下命令安装:sudo apt-get install libc6或libc6-dev(linux的termios库),但它们已经是最新版本。
所以,我不知道还能做什么。如果有人对我现在应该做什么有任何想法或意见,我真的很感激。
谢谢!
答案 0 :(得分:0)
termios.h
。在尝试编译之前,您需要将代码从Linux移植到Arduino平台。