Skip to Content
iOS Sensor Apps with Arduino
book

iOS Sensor Apps with Arduino

by Alasdair Allan
September 2011
Intermediate to advanced
128 pages
2h 36m
English
O'Reilly Media, Inc.
Content preview from iOS Sensor Apps with Arduino

Connecting an XBee to an iOS Device

Now that we’ve tested things between our Arduino board and our Mac, what do we need to do the same thing between our Arduino board and our iPhone?

XBee to RS-232 Serial

The first thing we need is an RS-232 adaptor. Fortunately SparkFun sells the XBee Explorer Serial for $29.95 (see Figure 5-11).

I don’t know of any others on the market that are as easily available, although if you don’t want to purchase the SparkFun adaptor, it should be moderately easy to breadboard an adaptor using your RS-232 to TTL serial adaptor that we’ve been using up till this point.

However, if you do that, you should remember that the XBee module runs at 3.3 V and the Redpark cable is at 5 V. You’ll need a voltage level shifter between the 3.3 V RX and TX of the XBee module and the 5 V of the TTL serial adaptor.

The SparkFun XBee Explorer Serial

Figure 5-11. The SparkFun XBee Explorer Serial

Go ahead and unplug the XBee that was originally attached to your Mac and plug it into the serial adaptor. Then plug the serial adaptor into your Redpark cable, and that in turn into your iPhone. Attach a power supply and turn it on; you should get something like Figure 5-12.

Everything connected and working

Figure 5-12. Everything connected and working

Congratulations, you’ve successfully connected your Arduino and your iPhone via an XBee serial pass-through ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Pro Arduino

Pro Arduino

Rick Anderson, Dan Cervo
Arduino Playground

Arduino Playground

Warren Andrews

Publisher Resources

ISBN: 9781449312794Errata Page