Hardware Reference
In-Depth Information
Other Microcontrollers (cont'd)
changes and control outputs at resolutions that exceed
human perception. However, complex-sensing features—
such as gesture recognition, multitasking, simpler
memory management, and the ability to interface
with devices using the same methods and libraries as
personal computers—will make a big difference. 32-bit
processors give physical interface makers the ability to
use or convert code libraries and frameworks developed
on servers and personal computers. There is where the
real excitement of these processors lies.
These possibilities are just beginning to be realized and
will easily fill another topic, or several. However, basic
sensing and networked communications are still well
within the capabilities of 8-bit controllers, so I've chosen
to keep the focus of this topic on them.
Like all microcontrollers, the Arduino and Wiring
modules are just small computers. Like every
computer, they have inputs, outputs, a power
supply, and a communications port to connect to other
devices. You can power these modules either through a
separate power supply or through the USB connection
to your computer. For this introduction, you'll power the
module from the USB connection. For many projects,
you'll want to disconnect them from the computer once
you've finished programming them. When you do, you'll
power the board from the external power supply.
Getting Started
Because the installation process for Wiring and Arduino
is similar, I'll detail only the Arduino process here. Wiring
users can follow along and do the same steps, substituting
“Wiring” for “Arduino” in the instructions. Download
the software from the appropriate site, then follow the
instructions below. Check the sites for updates on these
instructions.
!
Updates to the Arduino and Wiring software occur
frequently. The notes in this topic refer to Arduino version
1.0 and Wiring version 1.0. By the time you read this, the
specifics may be slightly different, so check the Arduino and
Wiring websites for the latest details.
Figure 1-10 shows the inputs and outputs for the Arduino
Uno. The other Arduino models and the Wiring module are
similar. Each module has the same standard features as
most microcontrollers: analog inputs, digital inputs and
outputs, and power and ground connections. Some of the
I/O pins can also be used for serial communication. Others
can be used for pulse-width modulation (PWM) , which is a
way of creating a fake analog voltage by turning the pin on
and off very fast. The Wiring and Arduino boards also have
a USB connector that's connected to a USB-to-Serial con-
troller, which allows the main controller to communicate
with your computer serially over the USB port. They also
have a programming header to allow you to reprogram the
firmware (which you'll never do in this topic) and a reset
button. You'll see these diagrams repeated frequently, as
they are the basis for all the microcontroller projects in the
topic.
Setup on Mac OS X
Double-click the downloaded file to unpack it, and you'll
get a disk image that contains the Arduino application
and an installer for FTDI USB-to-Serial drivers. Drag the
application to your Applications directory. If you're using
an Arduino Uno or newer board, you won't need the FTDI
drivers, but if you're using a Duemilanove or older board,
or a Wiring board, you'll need the drivers. Regardless of the
board you have, there's no harm in installing them—even
if you don't need them. Run the installer and follow the
instructions to install the drivers.
Search WWH ::




Custom Search