CubieBoard中文论坛

 找回密码
 立即注册
搜索
热搜: unable
查看: 7188|回复: 3

Cubieboard连接wii遥控器变成游戏手柄,实现重力感应

[复制链接]
发表于 2013-9-7 19:39:20 | 显示全部楼层 |阅读模式
本帖最后由 tll 于 2013-9-7 21:30 编辑

在arduino上已经完美了,cubie还是不是很完美,目前知道使用的是i2c协议
附Serial:
127        129        281        508        550        1        1        
127        129        283        510        550        1        1        
127        129        283        505        551        1        1        
127        129        277        505        541        1        1        
127        129        280        510        544        1        1        
127        129        281        508        546        1        1        
127        129        283        507        541        1        1        
127        129        280        505        543        1        1

手柄X 手柄Y X Y Z 按钮Z 按钮C

cubie实验成功,但是有点问题,不过一般还是正常的:
【这个是我自己写的,只读x和y】
Wiimote reader,you can do "i2cdetect -y 1" to check is "52" valid,if yes,continue
Start!
Begin I2c
Send shartup data to wiimote
Setup finished!
Get data from wiimote
X:175
Y:174
Get data from wiimote
X:175
Y:174
【这个是我用了RPi程序的源码】
Jx: 127 Jy: 112 Ax: 549 Ay: 407 Az: 396 Bc: False Bz: False
read
Jx: 127 Jy: 112 Ax: 556 Ay: 406 Az: 399 Bc: False Bz: False
read
Jx: 127 Jy: 112 Ax: 557 Ay: 402 Az: 397 Bc: False Bz: False
read
Jx: 127 Jy: 112 Ax: 556 Ay: 407 Az: 403 Bc: False Bz: False
read
Jx: 127 Jy: 112 Ax: 557 Ay: 401 Az: 397 Bc: False Bz: False
read
Jx: 127 Jy: 112 Ax: 557 Ay: 401 Az: 399 Bc: False Bz: False
read
Jx: 127 Jy: 112 Ax: 558 Ay: 402 Az: 396 Bc: False Bz: False
read
Jx: 127 Jy: 112 Ax: 561 Ay: 401 Az: 396 Bc: False Bz: False
回复

使用道具 举报

 楼主| 发表于 2013-9-7 21:30:02 | 显示全部楼层
可以啦
回复 支持 反对

使用道具 举报

发表于 2013-12-17 15:54:42 | 显示全部楼层
那以后烧个android系统可以当游戏机玩了!
回复 支持 反对

使用道具 举报

 楼主| 发表于 2014-1-16 13:29:03 | 显示全部楼层
jamesliang 发表于 2013-12-17 15:54
那以后烧个android系统可以当游戏机玩了!

差不多
回复 支持 反对

使用道具 举报

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

本版积分规则

QQ|Archiver|手机版|粤ICP备13051116号|cubie.cc---深刻的嵌入式技术讨论社区

GMT+8, 2024-5-4 07:21 , Processed in 0.021204 second(s), 15 queries .

Powered by Discuz! X3.4

© 2001-2012 Comsenz Inc. | Style by Coxxs

返回顶部