Getting Started with Arduino 2nd Edition Massimo Banzi download
Getting Started with Arduino 2nd Edition Massimo Banzi download
https://ebookname.com/product/getting-started-with-arduino-2nd-
edition-massimo-banzi/
https://ebookname.com/product/getting-started-with-sensors-
measure-the-world-with-electronics-arduino-and-raspberry-pi-1st-
edition-kimmo-karvinen/
https://ebookname.com/product/getting-started-with-citrix-
vdlinabox-brown/
https://ebookname.com/product/getting-started-with-raspberry-pi-
second-edition-richardson/
https://ebookname.com/product/forever-a-novel-of-good-and-evil-
love-and-hope-jude-deveraux/
Nitric oxide 1st Edition Gerald
https://ebookname.com/product/nitric-oxide-1st-edition-gerald/
https://ebookname.com/product/the-neighborhood-effect-the-
imperial-roots-of-regional-fracture-in-eurasia-1st-edition-anna-
ohanyan/
https://ebookname.com/product/cengage-advantage-books-
sociology-10th-edition-jon-m-shepard/
https://ebookname.com/product/bubble-value-at-risk-a-
countercyclical-risk-management-approach-max-c-y-wong/
https://ebookname.com/product/the-social-outcast-ostracism-
social-exclusion-rejection-and-bullying-1st-edition-kipling-d-
williams/
Recent Advances in Immunization 2nd Edition PAHO
Scientific Publications Pan American Health
Organization
https://ebookname.com/product/recent-advances-in-
immunization-2nd-edition-paho-scientific-publications-pan-
american-health-organization/
Getting
Started
with
Arduino
Massimo Banzi
Second Edition
Getting Started with Arduino
by Massimo Banzi
Print History:
October 2008: First Edition
September 2011: Second Edition
ISBN: 978-1-449-309879
[LSI]
Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v
1/Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Intended Audience. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
What Is Physical Computing?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
7/Troubleshooting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Testing the Board. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Testing Your Breadboarded Circuit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Isolating Problems. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Problems with the IDE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
How to Get Help Online. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Appendices. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Appendix A/The Breadboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Appendix B/Reading Resistors and Capacitors . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Appendix C/Arduino Quick Reference. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 5
Appendix D/Reading Schematic Diagrams. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Preface
» I combined devices I had hacked, and repurposed kits and other circuits
that I found in magazines to make them do new things.
Preface v
projects at the time were a dishwasher and an early computer that came
from an insurance office, which had a huge printer, electronics cards,
magnetic card readers, and many other parts that proved very interesting
and challenging to completely take apart.
This process of reading the articles over and over, with the benefit of
knowledge acquired while taking apart circuits, created a slow virtuous
circle.
With this new tool, I could quickly put together circuits and try them out to
see what happened. The prototyping cycle was getting shorter and shorter.
After that, I built radios, amplifiers, circuits that would produce horrible
noises and nice sounds, rain sensors, and tiny robots.
I’ve spent a long time looking for an English word that would sum up that
way of working without a specific plan, starting with one idea and ending
up with a completely unexpected result. Finally, “tinkering” came along.
I recognised how this word has been used in many other fields to describe
a way of operating and to portray people who set out on a path of explora-
tion. For example, the generation of French directors who gave birth to the
“Nouvelle Vague” were called the “tinkerers”. The best definition of tinkering
that I’ve ever found comes from an exhibition held at the Exploratorium
in San Francisco:
Tinkering is what happens when you try something you don’t quite know
how to do, guided by whim, imagination, and curiosity. When you tinker,
there are no instructions—but there are also no failures, no right or wrong
ways of doing things. It’s about figuring out how things work and reworking
them.
Tinkering is, at its most basic, a process that marries play and inquiry.
—www.exploratorium.edu/tinkering
From my early experiments I knew how much experience you would need
in order to be able to create a circuit that would do what you wanted start-
ing from the basic components.
My first and most important project after that was using my brand-new
ZX81 computer to control a welding machine. I know it doesn’t sound like
a very exciting project, but there was a need for it and it was a great chal-
lenge for me, because I had just learned how to program. At this point, it
became clear that writing lines of code would take less time than modify-
ing complex circuits.
Twenty-odd years later, I’d like to think that this experience allows me to
teach people who don’t even remember taking any math class and to infuse
them with the same enthusiasm and ability to tinker that I had in my youth
and have kept ever since.
—Massimo
Preface vii
Acknowledgments
I want to thank a lot more people but Brian tells me I’m running
out of space, so I’ll just list a small number of people I have to
thank for many reasons:
Please also let us know what we can do to make this book more
useful to you. We take your comments seriously and will try
to incorporate reasonable suggestions into future editions.
Maker Media
1005 Gravenstein Highway North
Sebastopol, CA 95472
(800) 998-9938 (in the U.S. or Canada)
(707) 829-0515 (international/local)
(707) 829-0104 (fax)
The O’Reilly web site for Getting Started with Arduino lists
examples, errata, and plans for future editions. You can find
this page at www.makezine.com/getstartedarduino.
For more information about this book and others, see the
O’Reilly website: www.oreilly.com.
Preface ix
1/Introduction
» You program it via a USB cable, not a serial port. This feature is useful,
because many modern computers don’t have serial ports.
Introduction 1
» The hardware is cheap. The USB board costs about €20 (currently,
about US$35) and replacing a burnt-out chip on the board is easy and
costs no more than €5 or US$4. So you can afford to make mistakes.
Intended Audience
This book was written for the “original” Arduino users: designers and
artists. Therefore, it tries to explain things in a way that might drive some
engineers crazy. Actually, one of them called the introductory chapters
of my first draft “fluff”. That’s precisely the point. Let’s face it: most
engineers aren’t able to explain what they do to another engineer, let
alone a regular human being. Let’s now delve deep into the fluff.
NOTE: Arduino builds upon the thesis work Hernando Barragan did on
the Wiring platform while studying under Casey Reas and me at IDII
Ivrea.
In the past, using electronics meant having to deal with engineers all the
time, and building circuits one small component at the time; these issues
kept creative people from playing around with the medium directly. Most
of the tools were meant for engineers and required extensive knowledge.
In recent years, microcontrollers have become cheaper and easier to use,
allowing the creation of better tools.
The progress that we have made with Arduino is to bring these tools one
step closer to the novice, allowing people to start building stuff after only
two or three days of a workshop.
With Arduino, a designer or artist can get to know the basics of electronics
and sensors very quickly and can start building prototypes with very little
investment.
Introduction 3
2/The Arduino Way
This is the tinkering process that we are so fond of—playing with the
medium in an open-ended way and finding the unexpected. In this search
for ways to build better prototypes, we also selected a number of soft-
ware packages that enable the process of constant manipulation of the
software and hardware medium.
The next few sections present some philosophies, events, and pioneers
that have inspired the Arduino Way.
A lot of beginners approaching electronics for the first time think that they
have to learn how to build everything from scratch. This is a waste of
energy: what you want is to be able to confirm that something’s working
very quickly so that you can motivate yourself to take the next step or
maybe even motivate somebody else to give you a lot of cash to do it.
Our hero is James Dyson, who made 5127 prototypes of his vacuum
cleaner before he was satisfied that he’d gotten it right (www.international.
dyson.com/jd/1947.asp).
This technique has been translated into the world of software by “visual
programming” environments like Max, Pure Data, or VVVV. These tools
can be visualised as “boxes” for the different functionalities that they pro-
vide, letting the user build “patches” by connecting these boxes together.
These environments let the user experiment with programming without
the constant interruption typical of the usual cycle: “type program,
compile, damn—there is an error, fix error, compile, run”. If you are more
visually minded, I recommend that you try them out.
Circuit bending is one of the most interesting forms of tinkering. It’s the
creative short-circuiting of low-voltage, battery-powered electronic audio
devices such as guitar effect pedals, children’s toys, and small synthesiz-
ers to create new musical instruments and sound generators. The heart
of this process is the “art of chance”. It began in 1966 when Reed Ghazala,
by chance, shorted-out a toy amplifier against a metal object in his desk
drawer, resulting in a stream of unusual sounds. What I like about circuit
benders is their ability to create the wildest devices by tinkering away with
technology without necessarily understanding what they are doing on the
theoretical side.
1
Quoted in Sara Reese Hedberg, “MIT Media Lab’s quest for perceptive computers,” Intelligent Systems and
Their Applications, IEEE, Jul/Aug 1998.
SLANG DICTIONARY.
A 1, first-rate, the very best; “she’s a prime girl, she is; she is
A 1.”—Sam Slick. The highest classification of ships at Lloyd’s;
common term in the United States; also at Liverpool and other
English seaports. Another, even more intensitive form is “first-class,
letter A, No. 1.” Some people choose to say A I, for no reason,
however, beyond that of being different from others.
Abigail, a lady’s-maid; perhaps obtained from old comedies. Used in
an uncomplimentary sense. Some think the term is derived from
Abigail Hill (Mrs. Masham), lady-in-waiting to Queen Anne, and a
typical abigail in the way of intrigue.
About Right, “to do the thing about right,” i.e., to do it properly,
soundly, correctly; “he guv it ’im about right,” i.e., he beat him
severely.
Abraham-man, a vagabond, such as were driven to beg about the
country after the dissolution of the monasteries.—See bess o’ bedlam,
infra. They are well described under the title of Bedlam Beggars.—
Shakspeare’s K. Lear, ii. 3.
It seems almost obvious that the term must have been applied, not
to dollars certainly, but to money, long before the time of Irving.
American Tweezers, an instrument used by an hotel-sneak which
nips the wards end of a key, and enables him to open a door from
the opposite side to that on which it has been locked.
Andrew Millar, a ship of war.—Sea.
Ain’t, the vulgar abbreviation of “am not,” “are not,” or “is not.”
Anointed, i.e., eminent; used to express great rascality in any one;
“an anointed scoundrel,” king among scoundrels.—Irish.
Anointing, a good beating. A case for the application of salve.
Anonyma, a lady of the demi-monde, or worse; a “pretty
horsebreaker.” Incognita was the term at first. Product of the
squeamishness of the age which tries to thrust away fact by the use
of fine words.
Antiscriptural, oaths, foul language. Anything unfit for ordinary
society conversation.
Apartments to Let, a term used in reference to one who has a
somewhat empty head. As, “He’s got apartments to let.”
Apostle’s Grove, the London district known as St. John’s Wood.
Also called grove of the evangelist.
Apostles, The Twelve, the last twelve names on the Poll, or
“Ordinary Degree” List at the Cambridge Examinations, when it was
arranged in order of merit, and not alphabetically, and in classes, as
at present; so called from their being post alios, after the others.—
See poll. The last of all was called St. Paul (or Saint Poll), as being
the least of the apostles, and “not meet to be called an apostle” (see
1 Cor. xv. 9). As in the “Honour” list (see Gulf), students who had
failed only slightly in one or more subjects were occasionally allowed
their degrees, and these were termed elegant extracts.—Camb. Univ.
Slang.
Apple-pie Bed, a trick played at schools on new comers, or on any
boy disliked by the rest. One of the sheets is removed, and the other
is doubled in the middle, so that both edges are brought to the top,
and look as if both sheets were there; but the unhappy occupant is
prevented getting more than half-way down, and he has to remake
his bed as best he can. This trick is sometimes played by children of
a larger growth.
Apple-Cart, the human structure, so far as the phrases with which
it is connected are concerned. As “I’ll upset your apple-cart,” “down
with his apple-cart.”
Apple-pie Order, in exact or very nice order.
Appro, contraction of approbation, a word much in use among
jewellers. Most of the extensive show of chains, watches, and
trinkets in a shop window is obtained “on appro,” i.e., “on sale or
return.”
Area Sneak, a thief who commits depredations upon kitchens and
cellars.
Argol-bargol, to bandy words.—Scotch.
Article, derisive term for a weak or insignificant specimen of
humanity.
Atomy, a diminutive or deformed person. From anatomy, or atom.
Back, “to get one’s back up,” to annoy or enrage. Probably from the
action of a cat when preparing to give battle to an enemy.
Back-end, that portion of the year which commences with October.
This phrase is peculiar to the turf, and has its origin in the fact that
October was actually, and is now nearly, the finishing portion of the
racing season. Towards back-end the punters and “little men”
generally begin to look forward with anxiety to their winter
prospects, and “going for the gloves” is not only a frequent phrase,
but a frequently recurring practice.
Back Out, to retreat from a difficulty; reverse of go ahead. Metaphor
borrowed from the stables.
Back Slang It, to go out the back way. Equivalent to “Sling your
hook out of the back-door,” i.e., get away quickly.
Backslums, the byeways and disreputable portions of a town.
Back-Hander, a blow on the face with the back of the hand, a
back-handed tip. Also a drink out of turn, as when a greedy person
delays the decanter to get a second glass. Anything done slyly or
secretly is said to be done in a back-handed manner.
Backer, one who places his money on a particular man or animal; a
supporter of one side in a contest. The great body of betting men is
divided into bookmakers and backers.
Back Jump, a back window.—Prison term.
Bacon, the body, “to save one’s bacon,” to escape.
Bad, “to go to the bad,” to deteriorate in character, to be ruined.
Virgil has an almost similar phrase, in pejus ruere, which means, by
the way, to go to the worse.
Bad, hard, difficult. Word in use among sporting men who say, “He
will be bad to beat,” when they mean that the man or horse to whom
they refer will about win.
Bad Egg, a scoundrel or rascal.
Badger, to tease, to annoy by “chaffing.” Suggestive of drawing a
badger.
Bad Lot, a term derived from auctioneering slang, and now
generally used to describe a man or woman of indifferent morals.
Badminton, blood,—properly a peculiar kind of claret-cup invented
at the Duke of Beaufort’s seat of that name. Badminton proper is
made of claret, sugar, spice, cucumber peel, and ice, and was
sometimes used by the patrons of the Prize Ring as a synonym for
blood.
Bad Words, words not always bad of themselves but unpleasant to
“ears polite,” from their vulgar associations.
Baffaty, calico. Term used in the drapery trade.
Bag, to seize or steal, equivalent to “collar.”
Bagman, a commercial traveller. This word is used more in
reference to the old style of commercial travellers than to the
present.
Bags, trousers. Trousers of an extensive pattern, or exaggerated
fashion, have sometimes been termed howling-bags, but only when
the style has been very “loud.” The word is probably an abbreviation
of bumbags. “To have the bags off,” to be of age and one’s own
master, to have plenty of money. Bags of mystery is another phrase in
frequent use, and refers to sausages and saveloys. Bag of tricks,
refers to the whole of a means towards a result. “That’s the whole
bag of tricks.”
Baked, seasoned, “he’s only half-baked,” i.e., soft, inexperienced.
Baker’s Dozen, thirteen. Originally the London bakers supplied the
retailers, i.e., chandlers’ shopkeepers and itinerants, with thirteen
loaves to the dozen, so as to make up what is known as the
overweight, the surplus number, called the inbread, being thrown in
for fear of incurring a penalty for short weight. To “give a man a
baker’s dozen,” in a slang sense, sometimes means to give him an
extra good beating or pummelling.
Balaam, printers’ slang for matter kept in type about monstrous
productions of nature, &c., to fill up spaces in newspapers that
would otherwise be vacant. The term balaam-box has often been used
as the name of a depository for rejected articles. Evidently from
Scripture, and referring to the “speech of an ass.”
Bald-Faced Stag, a term of derision applied to a person with a
bald head. Also, still more coarsely, “bladder-of-lard.”
Bale up, an Australian term equivalent to our “Shell out.” A demand
for instantaneous payment.
Ballambangjang. The Straits of ballambangjang, though unnoticed
by geographers, are frequently mentioned in sailors’ yarns as being
so narrow, and the rocks on each side so crowded with trees
inhabited by monkeys, that the ship’s yards cannot be squared, on
account of the monkey’s tails getting jammed into, and choking up,
the brace blocks.—Sea.
Ballast, money. A rich man is said to be well-ballasted. If not proud
and over-bearing he is said to carry his ballast well.
Balmy, weak-minded or idiotic (not insane).
Balmy, sleep; “have a dose of the balmy.”
The word bash, among thieves, signifies to flog with the cat or birch.
The worst that can happen to a brutal ruffian is to receive “a bashing
in, and a bashing out,”—a flogging at the commencement and
another at the close of his term of enforced virtue.
Baste, to beat, properly to pour gravy on roasting meat to keep it
from burning, and add to its flavour. Also a sewing term.
Bastile, the workhouse. General name for “the Union” amongst the
lower orders of the North. Formerly used to denote a prison, or
“lock-up;” but its abbreviated form, steel, is now the favourite
expression with the dangerous classes, some of whom have never
heard of bastile, familiar as they are with “steel.”
Bat, “on his own bat,” on his own account. Evident modification of
the cricket term, “off his own bat,” though not connected therewith.
—See hook.
Bat, to take an innings at cricket. To “carry out one’s bat” is to be
last in, i.e., to be “not out.” A man’s individual score is said to be
made “off his own bat.”
Bat, pace at walking or running. As, “He went off at a good bat.”
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
ebookname.com