Arduino Cookbook and over one million other books are available for Amazon Kindle. Learn more

Vous voulez voir cette page en français ? Cliquez ici.

Sign in to turn on 1-Click ordering.
Amazon Prime Free Trial required. Sign up when you check out. Learn More
More Buying Choices
Have one to sell? Sell yours here
Start reading Arduino Cookbook on your Kindle in under a minute.

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

Arduino Cookbook [Paperback]

Michael Margolis
4.3 out of 5 stars  See all reviews (3 customer reviews)
List Price: CDN$ 47.99
Price: CDN$ 29.78 & FREE Shipping. Details
You Save: CDN$ 18.21 (38%)
o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o
Only 5 left in stock (more on the way).
Ships from and sold by Gift-wrap available.
Want it delivered Tuesday, September 23? Choose One-Day Shipping at checkout.


Amazon Price New from Used from
Kindle Edition CDN $21.95  
Paperback CDN $29.78  
Save Up to 90% on Textbooks
Hit the books in's Textbook Store and save up to 90% on used textbooks and 35% on new textbooks. Learn more.
Join Amazon Student in Canada

Book Description

Jan. 2 2012 1449313876 978-1449313876 Second Edition

Want to create devices that interact with the physical world? This cookbook is perfect for anyone who wants to experiment with the popular Arduino microcontroller and programming environment. You’ll find more than 200 tips and techniques for building a variety of objects and prototypes such as toys, detectors, robots, and interactive clothing that can sense and respond to touch, sound, position, heat, and light.

You don’t need to have mastered Arduino or programming to get started. Updated for the Arduino 1.0 release, the recipes in this second edition include practical examples and guidance to help you begin, expand, and enhance your projects right away—whether you’re an artist, designer, hobbyist, student, or engineer.

  • Get up to speed on the Arduino board and essential software concepts quickly
  • Learn basic techniques for reading digital and analog signals
  • Use Arduino with a variety of popular input devices and sensors
  • Drive visual displays, generate sound, and control several types of motors
  • Interact with devices that use remote controls, including TVs and appliances
  • Learn techniques for handling time delays and time measurement
  • Apply advanced coding and memory handling techniques

Frequently Bought Together

Arduino Cookbook + Programming Arduino Getting Started with Sketches
Price For Both: CDN$ 41.29

One of these items ships sooner than the other.

Customers Who Bought This Item Also Bought

Product Details

Product Description

Book Description

Recipes to Begin, Expand, and Enhance Your Projects

About the Author

Michael Margolis is a technologist in the field of real time computing with expertise in developing and delivering hardware and software for interacting with the environment. He has more than 30 years of experience at senior levels with Sony, Microsoft, and Lucent/Bell Labs. He has written libraries and core software that are part of the official Arduino 1.0 distribution.

What Other Items Do Customers Buy After Viewing This Item?

Customer Reviews

3 star
2 star
1 star
4.3 out of 5 stars
4.3 out of 5 stars
Most helpful customer reviews
4.0 out of 5 stars A must Dec 28 2013
Format:Paperback|Verified Purchase
A very well written book. Can get a little technical at times as if the author assumes you know a few things, but overall well written and the 'recipes' are well explained.
Was this review helpful to you?
4.0 out of 5 stars Needs more May 12 2013
Format:Paperback|Verified Purchase
There needs to be more on how to cut the USB umbilical cord and how to create stand alone prototypes and power them. An extra chapter would have been good. Create a Vol 2 would be a good follow up.
Was this review helpful to you?
5.0 out of 5 stars Very good introduction book! Oct. 30 2012
By Spline
Format:Paperback|Verified Purchase
This book is a good one to start learning the Arduino possibilities. It is full a small projects that explain how a wide set of devices work.
Was this review helpful to you?
Most Helpful Customer Reviews on (beta) 4.6 out of 5 stars  130 reviews
125 of 126 people found the following review helpful
5.0 out of 5 stars Excellent survey of what you can do with Arduino Jan. 10 2012
By Mark Colan - Published on
Format:Paperback|Verified Purchase
This book presents the broad landscape of what's possible with Arduino. It is one of the few Arduino books available that have been updated for Arduino 1.0. Content is organized as "recipes", and you can combine them to do all kinds of things. Knowing what is possible should help to stimulate your imagination. The book does not go deep into any one subject, choosing instead to give you enough to get started, and pointers on where to go for deeper information.


Two kinds of skills are required (or developed) to build projects that use Arduino. One is working with electronics - gathering components, assembling them, and connecting them to the Arduino. The other is simple programming in C. If you have these skills but no experience with Arduino and want a quick start, this book will really help.

Someone with little or no experience in these areas may be able to figure it out from Chapter 1 in particular, and reading the rest carefully. Absolute beginners may find it easier to start with an absolute beginners book. If you buy this book and find it is too deep, keep it, you can always get a simpler book, then come back when you're ready.

The book is not a complete introduction to programming or electronics. The author chose to go broad to introduce his audience to a wide range of possibilities, rather than go very deep on any of them, but there is enough info to make it work, and references to go deeper.


The second edition has been updated to the Arduino 1.0 release. It is expanded to 724 pages, 62 more pages, and a few dollars less. Comparing the books side-by-side, the table of contents were nearly identical. The page numbers are different, owing to expanded text in the second edition, and a few new sections:

Sending Messages Using Low-Cost Tranceivers
Communicating with Bluetooth Devices
Updating Third-Party Libraries for Arduino 1.0
Uploading Sketches Using a Programmer
Replacing the Arduino Bootloader
Reprogram the Uno to Emulate a Native USB Device

...and an Appendix: Migrating to Arduino 1.0, which describes the changes you need to make to older code to work with Arduino 1.0.

If you have the first edition, you may not need to get the second edition. You can download the new source code from the publisher's Web site; you can google "Arduino Software Release Notes" for a list of changes, some of which will require minor changes to your code. The author says that a few newer hardware devices have replaced the ones described in the first edition, but less than one year passed between these two editions, so it would not be a lot. The change to Arduino 1.0 should not require changes to circuits.


The book has 18 chapters containing a total of 204 topics or "Recipes" structured as a Problem, a Solution, Discussion, and See Also sections. Most problems are things people would really want to do: pieces of a project. Solutions consist of C code and libraries, and electronic components. Discussion might be troubleshooting, variations, or more information. See Also provides references for more information - in the book, and URLs for Web-based information or libraries.

The average "recipe" is 3.1 pages long; some are longer than others.


Chapter 1 discusses the software development environment (which is supported for Windows, Mac, and Linux, but comes from Arduino) and very basic information about the board. In introduces simple programming and wiring by way of the common "blinking light" example. In 21 pages, the goal is to get something running quickly more than learning how it all works.

Two chapters explain a bit about C: types of variables and manipulations; mathematical operations for numeric types.

Programs must have input and/or output to be useful. Since this is what makes your solution come alive, this is the bulk of the book, and the most interesting part.

Chapter 4 introduces serial communications - exchanging information with a computer which is connected to the Arduino via USB. This can be used for I/O to a connected computer, as well as debugging your program by sending status messages at various points in the processing.

Chapter 5 discusses digital and analog input and output at a very basic level - controlling output to pins, and reading input from the pins. This is the foundation for all I/O that follows.

A strength of Arduino is the vast array of devices that work without a lot of extra circuitry. Chapter 6 discusses detecting light (or dark), movement, acceleration, vibration, distance, sound, temperature, location, direction, and interface to a computer mouse or a game controller. Chapter 7 discusses visual output using LEDs alone or in a matrix, 7-segment displays, and meters.

Chapter 8 discusses producing movement, vibration, or controlling external devices with relays and solenoids. Chapter 9 shows you how to make sounds - as tones, melodies, playing recordings, controlling a MIDI synthesizer, and making a simple audio synthesizer.

Chapter 10 presents uses of InfraRed devices (your home stereo, your camera, etc) as well as detecting and acting upon InfraRed signals from remotes you already have. Chapter 11 tells you how to use LCD displays available for Arduino to display text, or how to display text on the TV.

Chapter 12 deals with dates and times - make Arduino aware of passing time, or to work as an alarm clock.

Chapter 13 presents I2C and SPI, standards used for exchanging information between a variety of digital devices. Learn to use a standard and you'll find it can be used with other devices. For example, if you want to use a Wii Nunchuck controller to control your Arduino applications, you will need to learn about I2C. You can also use I2C to talk to external memory added to Arduino, get temperature for an external digital temperature measuring device, or display 4 numbers on 7-segment displays using only two wires.

Chapter 14 is about wireless communication. Chapter 15 discusses using an Ethernet shield to Internet-enable your Arduino application.

Chapter 16 discusses the creation and use of code libraries. Chapter 17 dives deeper into the subject of prgramming, especially in handling memory. Chapter 18 is all about using the controller chip hardware in ways not (yet) supported by libraries.

Nine appendices give basic information on building with electronics, troubleshooting, digital and analog I/O pins, and character sets. For those who have code written prior to the release of Arduino 1.0, an appendix is there to help you migrate.

The source code can be downloaded from the publisher's Web site; the URL is on page xv.


You should seriously consider the PDF version of the book, because all of the many links are live, and the PDF is on your computer as handy reference. You can always print pages as needed for reference while building. O'Reilly currently has a good deal for upgrading to a new PDF edition.


The book serves as an introduction to the broadest range of Arduino capabilities of any book I have seen. With a little experience, the book will get you going quickly by demonstrating a working example that may be enough for your purposes. For me, this book is indispensable for Arduino work.
184 of 199 people found the following review helpful
2.0 out of 5 stars Only for beginners Aug. 4 2011
By Gary Strawn - Published on
Format:Paperback|Verified Purchase
This is the first time I have ever considered returning a book to Amazon. I purchased this book based on the great reviews and a brief glance through the online preview pages. However, once I received the book I realized that it is not at all what I am looking for.

If you are new to programming, this book may be great. If you already know how to program but want to learn about the Arduino, this is NOT the book for you.

For example, chapters 1-3 discuss basic such as for loops (section 2.14) and the sqrt() function (section 3.8). This book works hard to avoid "advanced" subjects such as pointers and printf. Even in "Chapter 17: Advanced Coding and Memory Handling", there is barely any mention of heap and stack (SRAM) versus static (flash) memory. Sure, Ch.17 mentions the keyword PROGMEM but for any further details, the reader is referred to [...]. I don't need a general discussion of memory management, I bought this book hoping for information on the specific features and quirks of Arduino.

Want to learn about Arduino sleep modes? "18.10: Reducing Battery Drain" might seem like a good recipe. Don't bother though, all it does is reprint the most basic example of using the freely available Narcoleptic library from There is no mention of various Arduino sleep levels, how they may affect your code and what they do to the internal timers.

Let's pick a more basic example, how about a real-time clock? There is absolutely no discussion of the hardware side of a real-time clock. On the software side, there are a couple simple examples on using the standard C time library. It's a bit misleading to see "#include <Time.h>" in recipe 12.4 (note the <> brackets). Yes, <time.h> is a standard C library. No, it is not a standard part of the Arduino C library. So the book's example code won't even compile and there is no explanation as to why. The only mention of Time.h being a separate download is a vague mention in the "See Also" section which refers to the [...] website. An experienced programmer should be able to figure this out but anybody that needs three chapters on basic programming may need a bit more of an explanation.

In my opinion, that is where this book repeatedly fails. It acts like each recipe is a self contained problem/solution set. In reality, the majority of print is wasted on repeating the basics in every recipe and all the good information is left to the "See Also" references. What use is this book if I have to look everything up myself anyways?

If you are new to programming and need help with concepts like pointers or i++ instead of i = i + 1; then find a real C programming tutorial (K&R is my recommendation). If you are looking for specific information on how the Arduino actually works, save yourself a few bucks and visit [...] because that's all that this book will tell you to do anyways.
34 of 34 people found the following review helpful
5.0 out of 5 stars Very Well Done. Jan. 9 2012
By William J. Charnigo - Published on
This is truly a beginners book. It is very well done. The book does not attempt to teach programming or electronics, but gives enough information to actually accomplish the small projects presented. I do have a background in electronics and programming but I followed the steps in the beginning of the book, including downloading and installing the software. Within 15 to 30 minutes we were downloading software to the Arduino and had it working. I also got my 13 year old daughter to make some simple "C" programming changes and download them to the Arduino. This, with no prior background in programming.

The book contains many chapters on interfacing various sensors and devices with Arduino. I scanned them all and each one just gave me more and more ideas on things I wanted to tinker with.

I don't like the icons used in the book for Tips/Warnings - why invent something new. I think the standard yellow caution would be better.

This is a great book and Arduino is an outstanding product for beginners to continue an interest or develop a new interest in electronics/programming.
29 of 32 people found the following review helpful
5.0 out of 5 stars Comprehensive & Well Illustrated Reference Sourcebook for The Arduino March 28 2011
By Ira Laefsky - Published on
This Comprehensive Sourcebook represents a novel and much needed addition to the Arduino literature. Up until now many tutorials have been introduced which allow a hobbyist new to physical computing, to duplicate a range of experiments that will gradually increase his/her knowledge of the Arduino hardware, software library and IDE and show examples of interfacing to a variety of devices. This revolutionary sourcebook is most useful for the hobbyist who has gone beyond reproducing other people's experiments and now needs a easy-to-consult guide to any hardware, software, interfacing or communication problem s/he is likely to encounter in designing his own practical application (or advanced experiment with the Arduino. Fully-fleshed out explanations of the IDE and Software Library, constructing your own routines and libraries, device i/o with Digital, Analog and A/C line Connected Devices, as well as almost any type of Communication (Bluetooth, Zigbee, Ethernet or HTTP protocols). The detailed table of contents, clear illustrations and extensive index of this reference make finding the piece of Arduino lore you seek a pleasure.

This is the book for an Arduino, or other Physical Computing hobbyist who has gone beyond following other people's instruction and who now seeks a useful and comprehensive reference that will serve for years to come in a variety of Intermediate and Advanced Projects.

--Ira Laefsky
IT & HCI Researcher and Consultant Formerly on the Senior Staff of Arthur D. Little, Inc. and Digital Equipment Corporation
A Participant in the Philly Hackerspace--Hive 76
14 of 14 people found the following review helpful
4.0 out of 5 stars Arduino Cookbook - Great Arduino Recipes April 6 2011
By Steve Spence - Published on
Format:Paperback|Verified Purchase
This is an awesome tutorial, idea starter, and has a lot of background material to bring you up to speed, quickly. Unfortunately, in the Kindle (ebook) version, there are several illustration mix ups. Swapped images, duplicates, etc. Hopefully that will be fixed in the next edition, or slipstreamed into current production. Still a very good value!

4-25-11 Update - O'Reilly sent me a updated version. Hoping Amazon starts sending it out as well.
Search Customer Reviews
Only search this product's reviews

Look for similar items by category