Pages: 1 2 3 [4]   Go Down
Author Topic: Connecting Arduino to iPhone/iPod serial  (Read 17694 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 44
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 8
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 8
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

0
Offline Offline
Newbie
*
Karma: 0
Posts: 44
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 8
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

0
Offline Offline
Newbie
*
Karma: 0
Posts: 44
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

something like:

°  Arduino

|  1k res

° iPhone

| 1k res

° ground

?
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 44
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Pages: 1 2 3 [4]   Go Up
Jump to: