较新的版本是1.0.5。但为了研究之前的开源代码,pde格式项目文件,只能从0023版本开始搞。
安装过程见:http://playground.arduino.cc/Linux/Ubuntu
sudo apt-get install gcc-avr avr-libc
或参考:http://www.pluggy.me.uk/arduino-ubuntu/
然后下载需要的版本包,解压后直接运行 ./arduion即可打开ide。
遇到的问题:
1. arduino0023 for ubuntu版本里,tutorials工程就有编译错误。
现象及解决办法:
参考:https://groups.google.com/forum/#!topic/linux.debian.bugs.dist/9E6wE0b5wiw
In file included from /usr/lib/gcc/avr/4.5.3/../../.
from /usr/lib/gcc/avr/4.5.3/../../.
from /usr/share/arduino/hardware/
from /usr/share/arduino/hardware/
/usr/lib/gcc/avr/4.5.3/../../.
/usr/lib/gcc/avr/4.5.3/../../.
which is caused by the macro definition of round() in wiring.h:
#define round(x) ((x)>=0?(long)((x)+0.5):(long)
commenting out this line fixes this final compliation error and the program compiles, uploads and correctly works on the Arduino that I have.
2. arduino0023及1.0.5版本,编译成功后无法选择对应的ttyACM0端口。因为Serial菜单是灰色的。
解决办法: sudo ./arduino
此问题与putty中经常遇到的无法打开串口问题是类似的。解决办法是sudo putty即可。
如果/dev/ttyUSB0或/dev/ttyACM0仍然无打开权限。有一个办法就是chmod 777 /dev/ttyUSB0 这样就好了。

本文介绍了在Linux环境下安装Arduino IDE 0023和1.0.5版本的过程,以及遇到的编译错误和串口权限问题。在安装过程中,通过参考特定链接解决了delay.h和math.h头文件的编译冲突。对于无法选择Serial菜单和打开串口的问题,解决方案包括以管理员权限运行IDE或使用chmod命令赋予设备文件权限。
922

被折叠的 条评论
为什么被折叠?



