Getting Started with Arduino (Make: Projects)
Getting Started with Arduino, authored by Arduino co-founder Massimo Banzi, offers a brief, fun, and lucid overview of Arduino that will appeal to lots of people who've been wanting to get into physical computing and want a way in. This handy little guide should be just the ticket. To work with the introductory examples in this book, all you need is a USB Arduino, USB A-B cable, and an LED.The Arduino PlatformArduino is composed of two major parts: the Arduino board, which is the piece of hardware you work on when you build your objects; and the Arduino IDE, the piece of software you run on your computer. You use the IDE to create a sketch (a little computer program) that you upload to the Arduino board. The sketch tells the board what to do.Not too long ago, working on hardware meant building circuits from scratch, using hundreds of different components with strange names like resistor, capacitor, inductor, transistor, and so on.Every circuit was “wired” to do one specific application, and making changes required you to cut wires, solder connections, and more.With the appearance of digital technologies and microprocessors, these functions, which were once implemented with wires, were replaced by software programs.Software is easier to modify than hardware. With a few keypresses, you can radically change the logic of a device and try two or three versions in the same amount of time that it would take you to solder a couple of resistors.The Arduino HardwareThe Arduino board is a small microcontroller board, which is a small circuit (the board) that contains a whole computer on a small chip (the microcontroller). This computer is at least a thousand times less powerful than the MacBook I’m using to write this, but it’s a lot cheaper and very useful to build interesting devices. Look at the Arduino board: you’ll see a black chip with 28 “legs”—that chip is the ATmega168, the heart of your board.We (the Arduino team) have placed on this board all the components that are required for this microcontroller to work properly and to communicate with your computer. There are many versions of this board; the one we’ll use throughout this book is the Arduino Duemilanove, which is the simplest one to use and the best one for learning on. However, these instructions apply to earlier versions of the board, including the more recent Arduino Diecimila and the older Arduino NG. The figure on the left below shows the Arduino Duemilanove; The figure on the right shows the Arduino NG.