Make has put together an enticing kit for those interested in doing a little Arduino programming alongside the iPhone. The Redpark Breakout Pack is basically a serial cable with a connector on it that will go from an iPhone to an Arduino and let you send signals back and forth, even without jailbreaking.
There's a guide for setting up a simple project, but you'll have to have some previous knowledge of how to connect and run an Arduino, as well as create and run code on the iPhone. Note also that as far as I can tell (I'm not a developer, unfortunately), you still can't create apps for the App Store that work with this product -- at this point, all you can do is program your own iPhone to work with a local Arduino.
Still, anyone interested in connecting up an iPhone to one of these great open source electronics boards will probably find this to be one of the easiest (if not the cheapest) solutions to implement. If you make something cool, be sure to let us know about it!