极客工坊

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9633|回复: 12

【急】关于BOXZ编译时的问题

[复制链接]
发表于 2013-4-20 18:49:27 | 显示全部楼层 |阅读模式
我用的是UNO的板子,并且我已经把AFMotor库文件放入libraries文件夹里面,但是在编译盒仔的程序的时候还是出现这些错误,真心求解答。
下面是显示的错误:


E:\dianxin\Arduino\Arduino qudong\arduino-1.0.4-windows\arduino-1.0.4\libraries\AFMotor\AFMotor.cpp:7:22: error: WProgram.h: No such file or directory
E:\dianxin\Arduino\Arduino qudong\arduino-1.0.4-windows\arduino-1.0.4\libraries\AFMotor\AFMotor.cpp: In member function 'void AFMotorController::enable()':
E:\dianxin\Arduino\Arduino qudong\arduino-1.0.4-windows\arduino-1.0.4\libraries\AFMotor\AFMotor.cpp:27: error: 'OUTPUT' was not declared in this scope
E:\dianxin\Arduino\Arduino qudong\arduino-1.0.4-windows\arduino-1.0.4\libraries\AFMotor\AFMotor.cpp:27: error: 'pinMode' was not declared in this scope
E:\dianxin\Arduino\Arduino qudong\arduino-1.0.4-windows\arduino-1.0.4\libraries\AFMotor\AFMotor.cpp:37: error: 'LOW' was not declared in this scope
E:\dianxin\Arduino\Arduino qudong\arduino-1.0.4-windows\arduino-1.0.4\libraries\AFMotor\AFMotor.cpp:37: error: 'digitalWrite' was not declared in this scope
E:\dianxin\Arduino\Arduino qudong\arduino-1.0.4-windows\arduino-1.0.4\libraries\AFMotor\AFMotor.cpp: In member function 'void AFMotorController::latch_tx()':
E:\dianxin\Arduino\Arduino qudong\arduino-1.0.4-windows\arduino-1.0.4\libraries\AFMotor\AFMotor.cpp:45: error: 'LOW' was not declared in this scope
E:\dianxin\Arduino\Arduino qudong\arduino-1.0.4-windows\arduino-1.0.4\libraries\AFMotor\AFMotor.cpp:45: error: 'digitalWrite' was not declared in this scope
E:\dianxin\Arduino\Arduino qudong\arduino-1.0.4-windows\arduino-1.0.4\libraries\AFMotor\AFMotor.cpp:56: error: 'HIGH' was not declared in this scope
E:\dianxin\Arduino\Arduino qudong\arduino-1.0.4-windows\arduino-1.0.4\libraries\AFMotor\AFMotor.cpp:62: error: 'HIGH' was not declared in this scope
E:\dianxin\Arduino\Arduino qudong\arduino-1.0.4-windows\arduino-1.0.4\libraries\AFMotor\AFMotor.cpp:65: error: 'HIGH' was not declared in this scope
E:\dianxin\Arduino\Arduino qudong\arduino-1.0.4-windows\arduino-1.0.4\libraries\AFMotor\AFMotor.cpp: In function 'void initPWM1(uint8_t)':
E:\dianxin\Arduino\Arduino qudong\arduino-1.0.4-windows\arduino-1.0.4\libraries\AFMotor\AFMotor.cpp:91: error: 'OUTPUT' was not declared in this scope
E:\dianxin\Arduino\Arduino qudong\arduino-1.0.4-windows\arduino-1.0.4\libraries\AFMotor\AFMotor.cpp:91: error: 'pinMode' was not declared in this scope
E:\dianxin\Arduino\Arduino qudong\arduino-1.0.4-windows\arduino-1.0.4\libraries\AFMotor\AFMotor.cpp: In function 'void initPWM2(uint8_t)':
E:\dianxin\Arduino\Arduino qudong\arduino-1.0.4-windows\arduino-1.0.4\libraries\AFMotor\AFMotor.cpp:126: error: 'OUTPUT' was not declared in this scope
E:\dianxin\Arduino\Arduino qudong\arduino-1.0.4-windows\arduino-1.0.4\libraries\AFMotor\AFMotor.cpp:126: error: 'pinMode' was not declared in this scope
E:\dianxin\Arduino\Arduino qudong\arduino-1.0.4-windows\arduino-1.0.4\libraries\AFMotor\AFMotor.cpp: In function 'void initPWM3(uint8_t)':
E:\dianxin\Arduino\Arduino qudong\arduino-1.0.4-windows\arduino-1.0.4\libraries\AFMotor\AFMotor.cpp:162: error: 'OUTPUT' was not declared in this scope
E:\dianxin\Arduino\Arduino qudong\arduino-1.0.4-windows\arduino-1.0.4\libraries\AFMotor\AFMotor.cpp:162: error: 'pinMode' was not declared in this scope
E:\dianxin\Arduino\Arduino qudong\arduino-1.0.4-windows\arduino-1.0.4\libraries\AFMotor\AFMotor.cpp: In function 'void initPWM4(uint8_t)':
E:\dianxin\Arduino\Arduino qudong\arduino-1.0.4-windows\arduino-1.0.4\libraries\AFMotor\AFMotor.cpp:200: error: 'OUTPUT' was not declared in this scope
E:\dianxin\Arduino\Arduino qudong\arduino-1.0.4-windows\arduino-1.0.4\libraries\AFMotor\AFMotor.cpp:200: error: 'pinMode' was not declared in this scope
E:\dianxin\Arduino\Arduino qudong\arduino-1.0.4-windows\arduino-1.0.4\libraries\AFMotor\AFMotor.cpp: In constructor 'AF_Stepper::AF_Stepper(uint16_t, uint8_t)':
E:\dianxin\Arduino\Arduino qudong\arduino-1.0.4-windows\arduino-1.0.4\libraries\AFMotor\AFMotor.cpp:311: error: 'OUTPUT' was not declared in this scope
E:\dianxin\Arduino\Arduino qudong\arduino-1.0.4-windows\arduino-1.0.4\libraries\AFMotor\AFMotor.cpp:311: error: 'pinMode' was not declared in this scope
E:\dianxin\Arduino\Arduino qudong\arduino-1.0.4-windows\arduino-1.0.4\libraries\AFMotor\AFMotor.cpp:313: error: 'HIGH' was not declared in this scope
E:\dianxin\Arduino\Arduino qudong\arduino-1.0.4-windows\arduino-1.0.4\libraries\AFMotor\AFMotor.cpp:313: error: 'digitalWrite' was not declared in this scope
E:\dianxin\Arduino\Arduino qudong\arduino-1.0.4-windows\arduino-1.0.4\libraries\AFMotor\AFMotor.cpp:330: error: 'OUTPUT' was not declared in this scope
E:\dianxin\Arduino\Arduino qudong\arduino-1.0.4-windows\arduino-1.0.4\libraries\AFMotor\AFMotor.cpp:330: error: 'pinMode' was not declared in this scope
E:\dianxin\Arduino\Arduino qudong\arduino-1.0.4-windows\arduino-1.0.4\libraries\AFMotor\AFMotor.cpp:332: error: 'HIGH' was not declared in this scope
E:\dianxin\Arduino\Arduino qudong\arduino-1.0.4-windows\arduino-1.0.4\libraries\AFMotor\AFMotor.cpp:332: error: 'digitalWrite' was not declared in this scope
E:\dianxin\Arduino\Arduino qudong\arduino-1.0.4-windows\arduino-1.0.4\libraries\AFMotor\AFMotor.cpp: In member function 'void AF_Stepper::step(uint16_t, uint8_t, uint8_t)':
E:\dianxin\Arduino\Arduino qudong\arduino-1.0.4-windows\arduino-1.0.4\libraries\AFMotor\AFMotor.cpp:382: error: 'delay' was not declared in this scope
E:\dianxin\Arduino\Arduino qudong\arduino-1.0.4-windows\arduino-1.0.4\libraries\AFMotor\AFMotor.cpp:394: error: 'delay' was not declared in this scope

编译

编译
回复

使用道具 举报

发表于 2013-4-20 19:42:48 | 显示全部楼层
在E:\dianxin\Arduino\Arduino qudong\arduino-1.0.4-windows\arduino-1.0.4\libraries\AFMotor\AFMotor.cpp这里可以找到AFMotor.cpp文件吗
回复 支持 反对

使用道具 举报

发表于 2013-4-20 20:13:16 | 显示全部楼层
是不是ARDUINO版本问题
回复 支持 反对

使用道具 举报

 楼主| 发表于 2013-4-21 00:53:31 | 显示全部楼层
弘毅 发表于 2013-4-20 19:42
在E:\dianxin\Arduino\Arduino qudong\arduino-1.0.4-windows\arduino-1.0.4\libraries\AFMotor\AFMotor.cp ...

可以找到这个文件的。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2013-4-21 00:54:53 | 显示全部楼层
darkorigin 发表于 2013-4-20 20:13
是不是ARDUINO版本问题

应该不是,我问过,说是UNO兼容没问题
回复 支持 反对

使用道具 举报

发表于 2013-4-21 15:28:46 | 显示全部楼层
zc603447650 发表于 2013-4-21 00:54
应该不是,我问过,说是UNO兼容没问题

不是硬件兼容。很多是软件,记得很多库文件都不行,我的网卡驱动都不行,后来用了低版本的反倒好了。。。。编译的时候失败。。。

点评

我用了旧版本的驱动,结果还是这样。。。。没辙了  发表于 2013-4-21 18:22
回复 支持 反对

使用道具 举报

发表于 2013-4-21 15:33:21 | 显示全部楼层
我先前编译其他程序时,也出现过"...\libraries\"目录下的 .cpp文件错误,更新arduino其他的库文件(最新的库)就好了.
可以尝试更新库文件(全部的库文件).
回复 支持 反对

使用道具 举报

 楼主| 发表于 2013-4-21 17:33:51 | 显示全部楼层
darkorigin 发表于 2013-4-21 15:28
不是硬件兼容。很多是软件,记得很多库文件都不行,我的网卡驱动都不行,后来用了低版本的反倒好了。。。 ...

我用的是1.0.4的驱动,在官网上应该算最新的了吧。。。或许我应该试下旧版本的驱动吧。
回复 支持 反对

使用道具 举报

发表于 2013-4-21 17:37:11 | 显示全部楼层
回复 支持 反对

使用道具 举报

 楼主| 发表于 2013-4-21 21:33:34 | 显示全部楼层
darkorigin 发表于 2013-4-20 20:13
是不是ARDUINO版本问题

好吧 ,最后我换成Arduino 0022终于烧录成功了,只是又出了新问题了,我用手机蓝牙控制不了BOXZ,照着教程还是不行,哎,伤脑筋。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2013-4-21 22:24:46 | 显示全部楼层
程序烧录成功,但用安卓客户端却控制不了BOXZ,有和我有过同样问题的么,求解答了
回复 支持 反对

使用道具 举报

发表于 2014-10-21 14:18:35 | 显示全部楼层
zc603447650 发表于 2013-4-21 22:24
程序烧录成功,但用安卓客户端却控制不了BOXZ,有和我有过同样问题的么,求解答了

建议从Github下载最新代码44。有很多小伙伴都成功了

https://github.com/leolite/BOXZ/tree/BOXZ/BOXZ/Code/BT2.0
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|联系我们|极客工坊 ( 浙ICP备09023225号 )

GMT+8, 2020-7-5 22:14 , Processed in 0.053313 second(s), 28 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表