Go Down

Topic: Connecting Arduino to iPhone/iPod serial (Read 36684 times) previous topic - next topic


Thanks everybody for this really useful thread.
I just can't get a point. Once you menage to have a funcitonal serial comunication, is there a way to access these data using XCode?
I need to develop an app that uses some of the iPhone sensors (GPS, accelerometers) together with the sensors connected to the arduino, and I need to store all these data on the device.
Is it possible, to access to the serial flow from inside a regular XCode app?
Thanks so much


The objective C you're writing in xcode can get that data at runtime, sure. XCode itself will never see it.

There isn't an easy step by step guide on how to do this, but you can look on the first page for conrad's code and start there. I got it working but first I had to install the IOKit headers into my iphone SDK. They are in your simulator SDK but not your device SDK.


About that... I'm fixing my SVN server right now, so those previous links won't work.


Ok that's enough for me at the moment, since I just ordered the breakout connector and cannot work right now.
I will try to do that when I will be able to get the physical connection.
So 1K resistance from arduino to iPhone is enough or it is not so safe?


No, you need a voltage divider (Google it), and one with 2 1K resistors works great for me.


something like:

°  Arduino

|  1k res

° iPhone

| 1k res

° ground



I made it,
the iphone receives data from Arduino, i can see it in terminal.
Now the tricky part is... I need to access this serial stream from inside an objective C application.
I just need to cach a single character once a minute (that's the reading of a digital sensor connected to the arduino).
Any help about it?

Go Up