Hardware Reference
In-Depth Information
One Big Network
Before the Internet, there was the telephone network. All connections were analog
electrical circuits, and all phone calls were circuit-switched, meaning that there had
to be a dedicated circuit between callers. Then modems came along, which allowed
computers to send bits over those same analog circuits. Gradually, switchboards were
replaced with routers, and now telephone networks are mostly digital as well. Circuits are
virtual, and what takes place behind the scenes of your phone calls is not that different
from what occurs behind the scenes of your email or chat conversation: a session is
established, bits are exchanged, and communication happens. The difference between a
phone call and an email is now a matter of network protocols, not electrical circuits.
There are plenty of IP-based telephony tools that blur the
line between phone call and Internet connection, including
the open source telephony server Asterisk ( www.asterisk.
org ), as well as telephony services from companies like
Twilio ( www.twilio.com ), Google Voice (www. voice.google.
com ), and Skype ( www.skype.com ). These voice services
are compatible with those offered by your phone company.
What the phone company is giving you on top of the
software service is a network of wires and routers that
prioritizes voice services, so you are guaranteed a quality
of service that you don't always get on IP-only telephony
services.
down versions of what you find on a laptop, desktop, or
tablet computer. Most smartphones also incorporate
some basic sensors, such as a camera, accelerometer,
light sensor, and sometimes GPS. And, of course, they
are networked all the time. What they lack, however, is
the capability for adding sensors, motors, and other
actuators—the stuff for which microcontrollers are made.
When you treat the phone as a multimedia computer and
mobile network gateway, you open up a whole host of pos-
sibilities for interesting projects.
Interfacing phones and microcontrollers can be done
in a number of ways, depending on the phone's capa-
bilities. For the purposes of this chapter, I'll be talking
about smartphones, so you can assume most or all of
the following capabilities, many of which you'll use in the
projects to come:
Telephony services and Internet services meet on gateway
servers and routers that run software to translate between
protocols. For example, mobile phone carriers all offer
SMS gateway services that allow you to send an email
that becomes an SMS, or to send an SMS that emails the
person you want to reach. Google Voice and many of the
other online telephony services offer voicemail-to-text,
in which an incoming call is recorded as a digital audio
file, then run through voice-recognition software and
turned into text, and finally emailed to you. The major task
when building projects that use the telephony network is
learning how to convert from one protocol to another.
A Computer in Your Pocket
Mobile phones are far more than just phones now. The
typical smartphone—such as an Android phone, iPhone,
Blackberry, or Windows Phone—is a computer capable of
running a full operating system. The processing power is
well beyond that of older desktop machines, and smart-
phones run operating systems that are slightly stripped
• Programmability
• Touchscreen or keyboard
• Mobile network access
• Bluetooth serial port
• USB connection
• Microphone, speaker
• Onboard accelerometer
• Onboard GPS
Figure 10-2
Possible ways of linking microcontrollers and
mobile phones.
 
Search WWH ::




Custom Search