So, one of my first bigger project is to make an arcade machine for my iPad using the arduino leonardo connected to my push buttons & joystick (it will work with a jailbreaked device and some tweeks).- First... I can't seem to figure out how to get the pushbuttons to work as the directional arrows. I have tried a lot, actually...It won't work on my mac either...

- Second... When I connect the leonardo to my iPad via the camera connector, I got an error message saying that the connected device isn't supported (I use a DC adapter for powering the leonardo). Thats ok, but the buttons won't work at all (I tried to map regular keypresses too, like "u", "d" etc.)!

Here is my code. As you can see, I'm quite a n00b... But at least I'm trying, right?

Well, you were right. A standard usb keyboard for PC doesn't work either (on iPad, keyboards needs external power to work, but not on iPhones, so I checked it out). PC bluetooth keyboards work like a charm, but usb makes it more complicated for some reason.

I have no idea how to find what type of input the iPad supports though... I guess I have to do some research. :~

That is a possibility, but then I can't control the whole iPad (home screen etc) with my joystick. I use BeeKeyboard (jailbreak app) to control everything, and witha dedicated button, regular keystrokes get turned into iCade controls. I know my brother tries to make an arduino iCade, but he got some debounce issues that he can't seem to figure out (I think it's on this forum somewhere).

So, one of my first bigger project is to make an arcade machine for my iPad using the arduino leonardo connected to my push buttons & joystick (it will work with a jailbreaked device and some tweeks).

Greetings. I have done just this, with an Arduino Leonardo and a Teensy 2.0. I will be glad to share my source with you when I have a moment from home. Somewhere in this forum I think I have a post about my efforts, and here was my blog post:

I probably could have done this more cleanly, but here's code I recently used to get a Sega Genesis controller talking to iPad (emulating the iCade). I'm using an Uno R3, and the atmega16u2 is flashed to act as a keyboard.

The iCade issues one keypress when a button is pushed and another when it is released. The button mappings can be found here: http://www.thinkgeek.com/files/iCADE/iCade_Dev_Resource_v1_3.pdf

I also posted various other work-in-progress experiments, including one that uses a Circuits@Home USB Host shield to read from a standard Playstation style USB arcade joystick and then translate the keys to iCade, allowing me to use my cheap fighter stick with any iCade game on the iPad. Maybe it will be of use to someone. Eventually I will have time to go in and clean up the code and finish it. I have learned much since I started that project.