Cubieboard连接wii遥控器变成游戏手柄,实现重力感应
本帖最后由 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
可以啦 那以后烧个android系统可以当游戏机玩了!:lol jamesliang 发表于 2013-12-17 15:54 static/image/common/back.gif
那以后烧个android系统可以当游戏机玩了!
差不多
页:
[1]