2

I wanted to make an RPG for Android 2.3 Mobile Phone and thought that the good old Gameboy had the perfect format for such games. So I want to build a "Case" with a D-Pad and a few keys and connect them with the Android Device over USB. I don't want Bluetooth, because it needs to much energy. I thought about giving the Case its own Battery Cell and maybe loading the Android Device with it. So my Question is:

How can I access the Keys of this Case from the Android Device?

4

2 回答 2

5

您可以考虑使用Android Open Accessory Development Kit

即使您不想购买 ADK,上面的链接也包含有助于您开发配件接口的信息。特别是,关于实现附件协议的部分和下面关于 ADK 如何实现协议的部分应该提供信息。此外,您可能需要查看USB 附件链接,其中包含有关与附件通信的部分

于 2012-03-23T18:52:49.700 回答
1

不幸的是,您可以在具有主机 USB 端口的设备上使用 USB,但没有多少设备具有此功能。您的其他选择是蓝牙或 wifi,两者都可以通过多种方式实现。如果您使用 Google Arduino + Android,我相信您会发现人们通过 Arduino 将硬件连接到 Android 设备的示例。这不是唯一的方法,只是你可以做到的一种方法的一个例子。

Android USB 文档 http://developer.android.com/guide/topics/usb/index.html

编辑你,我想,也可以使用 Arduino 作为 USB 主机,并在 Android 端使用附件模式。无论如何,这些选项都不是非常简单的,您需要进行大量研究才能完成您的设想。

于 2012-03-23T18:52:13.777 回答