tags:

views:

119

answers:

2

Hi:

I want to turn on a little engine with the iphone I mean, using the 30-pin cable and connecting some cables to the engine. Which is the code I have to write to do that? And the most important, is that possible or is just a dream?

+7  A: 

Perhaps you want the External Accessory Framework Reference?

The External Accessory framework provides support for communicating with external hardware connected to an iPhone OS–based device through the 30-pin dock connector or wirelessly using Bluetooth.

Also see Apple's landing page for accessory developers.

Sixten Otto
Note that you will need to become an approved member of the Made for iPod program to directly control your accessory via this framework, which will take a lot more time and money than he'd be willing to spend for a hobby project. However, it sounds like some general-purpose accessories may be on the way that might let him control his engine via their analog or digital outputs.
Brad Larson
+1  A: 

It's possible, but you have to convince Apple to let you do it. The connector itself is a proprietary design, and Apple's approval is required before Molex will sell it to you. Also, they're not really set up for hobbyists or experimenters; they want to deal with people making hardware add-ons to sell to the general public.

NSResponder