菩提明镜 发表于 2012-11-4 16:18:16

弘毅 发表于 2012-11-2 21:38 static/image/common/back.gif
是不是库没放对文件夹

库对的 其他的都可以的 就是这个报错 编译不过 应该不用接Ps2手柄的吧

弘毅 发表于 2012-11-4 20:12:47

菩提明镜 发表于 2012-11-4 16:18 static/image/common/back.gif
库对的 其他的都可以的 就是这个报错 编译不过 应该不用接Ps2手柄的吧

换一个IDE试试。。。学习笔记里当时用的是0022的IDE,如果1.0.1下会出问题,或者换用1.0.1 IDE的库

小猪少校 发表于 2012-11-8 10:10:30

:loveliness:东一个 啊

默阿 发表于 2012-11-23 16:51:34

找了很久,太好了,感谢

ihs7017 发表于 2012-12-1 00:20:40

大家好,小弟是初次接触arduino,买了个arduino mega2560板子想连接ps的手柄,但是弄了数天也弄不到,大家能帮帮小弟吗?
小弟用的是arduino mega2560 1.0.2的IDE
上官方网站下载了 psx.zip檔,当确认的时候出现以下的错误

In file included from Psx.pde:26:
C:\Documents and Settings\Administrator\桌面\arduino-1.0.2\libraries\Psx/Psx.h:30:24: error: WConstants.h: No such file or directory
In file included from Psx.pde:26:
C:\Documents and Settings\Administrator\桌面\arduino-1.0.2\libraries\Psx/Psx.h:54: error: 'byte' has not been declared
C:\Documents and Settings\Administrator\桌面\arduino-1.0.2\libraries\Psx/Psx.h:54: error: 'byte' has not been declared
C:\Documents and Settings\Administrator\桌面\arduino-1.0.2\libraries\Psx/Psx.h:54: error: 'byte' has not been declared
C:\Documents and Settings\Administrator\桌面\arduino-1.0.2\libraries\Psx/Psx.h:54: error: 'byte' has not been declared
C:\Documents and Settings\Administrator\桌面\arduino-1.0.2\libraries\Psx/Psx.h:54: error: 'byte' has not been declared
C:\Documents and Settings\Administrator\桌面\arduino-1.0.2\libraries\Psx/Psx.h:65: error: 'byte' does not name a type
C:\Documents and Settings\Administrator\桌面\arduino-1.0.2\libraries\Psx/Psx.h:67: error: 'byte' does not name a type
C:\Documents and Settings\Administrator\桌面\arduino-1.0.2\libraries\Psx/Psx.h:68: error: 'byte' does not name a type
C:\Documents and Settings\Administrator\桌面\arduino-1.0.2\libraries\Psx/Psx.h:69: error: 'byte' does not name a type
C:\Documents and Settings\Administrator\桌面\arduino-1.0.2\libraries\Psx/Psx.h:70: error: 'byte' does not name a type
C:\Documents and Settings\Administrator\桌面\arduino-1.0.2\libraries\Psx/Psx.h:72: error: 'byte' does not name a type
C:\Documents and Settings\Administrator\桌面\arduino-1.0.2\libraries\Psx/Psx.h:73: error: 'byte' does not name a type
C:\Documents and Settings\Administrator\桌面\arduino-1.0.2\libraries\Psx/Psx.h:74: error: 'boolean' does not name a type
C:\Documents and Settings\Administrator\桌面\arduino-1.0.2\libraries\Psx/Psx.h:75: error: 'byte' does not name a type
C:\Documents and Settings\Administrator\桌面\arduino-1.0.2\libraries\Psx/Psx.h:77: error: 'byte' does not name a type
C:\Documents and Settings\Administrator\桌面\arduino-1.0.2\libraries\Psx/Psx.h:78: error: 'byte' does not name a type
In file included from Psx.pde:35:
C:\Documents and Settings\Administrator\桌面\arduino-1.0.2\hardware\arduino\cores\arduino/Arduino.h:111: error: expected ',' or '...' before numeric constant
C:\Documents and Settings\Administrator\桌面\arduino-1.0.2\hardware\arduino\cores\arduino/Arduino.h:112: error: expected ',' or '...' before numeric constant

谢谢

弘毅 发表于 2012-12-1 18:26:18

ihs7017 发表于 2012-12-1 00:20 static/image/common/back.gif
大家好,小弟是初次接触arduino,买了个arduino mega2560板子想连接ps的手柄,但是弄了数天也弄不到,大家能帮帮 ...

换用0023 IDE或者我晚些时候。。。放上来1.0以后版本可以用的库。

ihs7017 发表于 2012-12-1 20:15:23

先行谢谢毅大哥,今天花了半天的时间终于找到解决方法,在本站同样是毅大哥的文章 使老版本库文件支持Arduino 1.0 IDE的方法 ,原来是IDE新旧版本的问题,把程序加载板子后,又出现了一个问题,明明没有按任何按键,P13的灯号也一直亮着,开启serial moniter的没有任何读取的数据,是否我的线路出现了问题,或是其它问题?:'(

弘毅 发表于 2012-12-1 21:05:03

ihs7017 发表于 2012-12-1 20:15 static/image/common/back.gif
先行谢谢毅大哥,今天花了半天的时间终于找到解决方法,在本站同样是毅大哥的文章 使老版本库文件支持Arduino ...

可能是库的问题,帖子尾部我刚更新了一个原生支持1.0 IDE的1.8最新版本的库,你下载回来试试看。

ihs7017 发表于 2012-12-3 23:43:56

谢谢毅大哥,1.8版本依然不行.p13的灯号依然长亮,serial monitor显示
” No controller found, check wiring, see readme.txt to enable debug. visit www.billporter.info for troubleshooting tips Unknown Controller type”
我是用ps最旧没有振动那种手柄,有影响吗,另外线路接驳是按照文章的方法,应该没有问题吧,我还有甚么方法测试是那里出现问题,谢谢!

弘毅 发表于 2012-12-4 09:22:44

ihs7017 发表于 2012-12-3 23:43 static/image/common/back.gif
谢谢毅大哥,1.8版本依然不行.p13的灯号依然长亮,serial monitor显示
” No controller found, check wirin ...

这样子呀。。。。老手柄,那我再去找找1.4版本的库,新版本的库都比较挑手柄。。。找到后传上来你再试试。

弘毅 发表于 2012-12-4 18:37:19

ihs7017 发表于 2012-12-3 23:43 static/image/common/back.gif
谢谢毅大哥,1.8版本依然不行.p13的灯号依然长亮,serial monitor显示
” No controller found, check wirin ...

已经放了一个1.41版本的库。。你用这个试试,这个库对一些新版本库不支持的老手柄支持度好一些。

ihs7017 发表于 2012-12-6 00:20:47

1.41的版本已经测试了,情况有点改善,但还是不行…..:'(:'(:'(:'(:'(
Controller found but not accepting commands. see readme.txt to enable debug. Visit www.billporter.info for troubleshooting tips

现在向两方面着手 1.不知是否延长线太长,影响电压
                         2.找了另一个程序,是日本人写的,多用了手柄pin9的线,不知会否好一点,但下载回来试的                     时候 使用IDE0022和1.0.2运行同样出现错误的问题,不知如果解决
http://pspunch.com/pd/article/arduino_lib_gpsx.html

小熊 发表于 2012-12-13 13:22:44

请问这个程序是用keil编写的吗 用的是什么单片机 还有这个手柄如果接收器没有写程序 只加vcc个地 能配对吗 谢谢

弘毅 发表于 2012-12-13 21:50:39

小熊 发表于 2012-12-13 13:22 static/image/common/back.gif
请问这个程序是用keil编写的吗 用的是什么单片机 还有这个手柄如果接收器没有写程序 只加vcc个地 能配对吗...

使用Arduino的IDE编写,底层是GCC,用的是AVR单片机。不写程序也可以配对。

lmb312 发表于 2013-1-1 10:37:04

是PS2X库1.6版~目前最新的这个是ide.1.0.1的 ?
页: 1 2 3 4 [5] 6 7 8 9 10
查看完整版本: arduino学习笔记24 - PS2无线手柄实验