The 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 for building interesting devices.
Look at the center of the Arduino Uno board: you’ll see a rectangular black piece of plastic with 28 “legs” (or possibly a tiny square piece of plastic if you have the SMD edition)—that chip is the ATmega328, 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. The version of the board we’ll use mostly in this book is the Arduino Uno, which is the simplest one to use and the best one for learning on. Almost everything we’ll talk about applies to all Arduinos, including the most recent ones as well as the earlier ones.
In Figure 3-1, you see that the Arduino has a row of strips at the top and the bottom with lots of labels. These strips are the connectors, which are used to attach to sensors and actuators. (A sensor senses something in the physical world and converts it to a signal a computer can understand, while an actuator converts a signal from a computer into an act in the physical world. You’ll learn much more about sensors and actuators later in this book.)
At first, all those connectors might be a little confusing. Here is an explanation of the input and output pins you’ll learn to use in this book. Don’t worry if you’re still confused after reading this—there are many new concepts in this book that might take you a while to get used to. We’ll repeat these explanations a number of different ways, and they’ll especially start making sense to you once you start building circuits and experiencing the results.14 Digital I/O (input/output) pins, numbered 0–13.
These pins can be either inputs or outputs. Inputs are used to read information from sensors, while outputs are used to control actuators. You will specify the direction (in or out) in the sketch you create in the IDE. Digital inputs can only read one of two values, and digital outputs can only output one of two values (HIGH and LOW).6 Analogue In pins (pins 0–5)
The analogue input pins are used for reading voltage measurements from analogue sensors. In contrast to digital inputs, which can distinguish between only two different levels (HIGH and LOW), analogue inputs can measure 1,024 different levels of voltage.6 Analogue Out pins (pins 3, 5, 6, 9, 10, and 11)
These are actually six of the digital pins that can perform a third function: they can provide analogue output. As with the digital I/O pins, you specify what the pin should do in your sketch.
The board can be powered from your computer’s USB port, most USB chargers, or an AC adapter (9 volts recommended, 2.1 mm barrel tip, center positive). Whenever power is provided at the power socket, Arduino will use that, and if there is no power at the power socket, Arduino will use power from the USB socket. It’s safe to have power at both the power socket and the USB socket.
Leave a Reply