极客工坊

 找回密码
 注册

QQ登录

只需一步,快速开始

楼主: 弘毅

arduino学习笔记24 - PS2无线手柄实验

  [复制链接]
发表于 2012-11-4 16:18:16 | 显示全部楼层
弘毅 发表于 2012-11-2 21:38
是不是库没放对文件夹

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

使用道具 举报

 楼主| 发表于 2012-11-4 20:12:47 | 显示全部楼层
菩提明镜 发表于 2012-11-4 16:18
库对的 其他的都可以的 就是这个报错 编译不过 应该不用接Ps2手柄的吧

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

使用道具 举报

发表于 2012-11-8 10:10:30 | 显示全部楼层
东一个 啊
回复 支持 反对

使用道具 举报

发表于 2012-11-23 16:51:34 | 显示全部楼层
找了很久,太好了,感谢
回复 支持 反对

使用道具 举报

发表于 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
大家好,小弟是初次接触arduino,买了个arduino mega2560板子想连接ps的手柄,但是弄了数天也弄不到,大家能帮帮 ...

换用0023 IDE或者我晚些时候。。。放上来1.0以后版本可以用的库。
回复 支持 反对

使用道具 举报

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

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
回复 支持 反对

使用道具 举报

 楼主| 发表于 2012-12-1 21:05:03 | 显示全部楼层
ihs7017 发表于 2012-12-1 20:15
先行谢谢毅大哥,今天花了半天的时间终于找到解决方法,在本站同样是毅大哥的文章 使老版本库文件支持Arduino ...

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

使用道具 举报

发表于 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最旧没有振动那种手柄,有影响吗,另外线路接驳是按照文章的方法,应该没有问题吧,我还有甚么方法测试是那里出现问题,谢谢!

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
回复 支持 反对

使用道具 举报

 楼主| 发表于 2012-12-4 09:22:44 | 显示全部楼层
ihs7017 发表于 2012-12-3 23:43
谢谢毅大哥,1.8版本依然不行.p13的灯号依然长亮,serial monitor显示
” No controller found, check wirin ...

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

使用道具 举报

 楼主| 发表于 2012-12-4 18:37:19 | 显示全部楼层
ihs7017 发表于 2012-12-3 23:43
谢谢毅大哥,1.8版本依然不行.p13的灯号依然长亮,serial monitor显示
” No controller found, check wirin ...

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

使用道具 举报

发表于 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
请问这个程序是用keil编写的吗 用的是什么单片机 还有这个手柄如果接收器没有写程序 只加vcc个地 能配对吗  ...

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

使用道具 举报

发表于 2013-1-1 10:37:04 | 显示全部楼层
是PS2X库1.6版~目前最新的这个是ide.1.0.1的 ?
回复 支持 反对

使用道具 举报

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

本版积分规则 需要先绑定手机号

Archiver|联系我们|极客工坊

GMT+8, 2024-4-26 09:10 , Processed in 0.058183 second(s), 22 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2021, Tencent Cloud.

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