3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

How To Connect a PS/2 Keyboard to the iPhone

Step 11Finishing Touches and Future Work

To finish up, reconnect the lead from Pin 13 on the iPhone breakout to the TX pin (pin 1) on the Arduino.  Disconnect the USB cable and switch the Arduino to external power.  Plug the iPhone breakout into your iPhone.

If:

  • TouchClient is running on your iPhone
  • The PS2 software is running on your Arduino
  • The Keyboard is plugged into the connector, and the connector wired to the Arduino correctly
  • Veency is running and you have accepted the connection from TouchClient
  • Nothing else is screwed up

You should be able to type on the PS/2 keyboard and have those keystrokes translated to the appropriate iPhone keystrokes.  This will work anywhere in the iPhone, in any app or native feature.

This solution isn’t perfect, but it’s a general-purpose approach to using the Arduino to add PS/2 keyboard support to almost anything that can read simple serial messages.

Future work:

  • The scan code mapping could be moved entirely to the iPhone, and the hardware part of this project could be reimplemented on a much cheaper and lower power consumption chip, like a PIC.  This would reduce the cost of the unit by about $30, although it would require a PIC programmer.
  • Not all special keys are correctly mapped, but if you look in the Arduino code and then at the iPhone code, you’ll see that this is an incredibly simple process.  Please post any changes you make back here as a comment!
  • Rather than being a crazy wire hack, I’d like to see this fit into a snug little enclosure for real portability.  Any ideas in this department would be appreciated.
  • I would like to give TouchClient a password for Veency so that there isn’t that annoying Accept/Decline pop-up.
  • This exact method could be used to add a Bluetooth keyboard.  Simply add a Bluetooth-Serial module to the iPhone breakout and keep using TouchClient & Veency.

That’s it.  I hope you enjoyed the Instructable!  Looking forward to your comments.

Regards,

- awgh
 

« Previous StepDownload PDFView All StepsNext Step »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
1
Followers
1
Author:awgh