Book Image

Mastering Arduino

By : Jon Hoffman
Book Image

Mastering Arduino

By: Jon Hoffman

Overview of this book

Mastering Arduino is an all-in-one guide to getting the most out of your Arduino. This practical, no-nonsense guide teaches you all of the electronics and programming skills that you need to create advanced Arduino projects. This book is packed full of real-world projects for you to practice on, bringing all of the knowledge in the book together and giving you the skills to build your own robot from the examples in this book. The final two chapters discuss wireless technologies and how they can be used in your projects. The book begins with the basics of electronics, making sure that you understand components, circuits, and prototyping before moving on. It then performs the same function for code, getting you into the Arduino IDE and showing you how to connect the Arduino to a computer and run simple projects on your Arduino. Once the basics are out of the way, the next 10 chapters of the book focus on small projects centered around particular components, such as LCD displays, stepper motors, or voice synthesizers. Each of these chapters will get you familiar with the technology involved, how to build with it, how to program it, and how it can be used in your own projects.
Table of Contents (23 chapters)

Touring the Arduino UNO R3

The Arduino is an open source hardware and software platform that is incredibly powerful yet easy to use. You can look at and download the code from any of the Arduino repositories on GitHub here: https://github.com/arduino. This platform has captured the imagination of electronic enthusiasts and the maker community everywhere. It enables people to inexpensively experiment with electronic prototypes and see their projects come to life. These projects can range from simply making an LED blink or recording the temperature to controlling 3D printers or making robots.

While there are numerous models of the Arduino, in this book we will primarily be using the very popular Arduino UNO R3 board. The following photograph shows the Arduino Uno's board layout with the main connectors identified:

For the purposes of this book, anytime we refer to the Arduino Uno board or the Uno board we are referring to the Arduino Uno R3 depicted in the preceding photograph.

As we can see, the Arduino Uno of today still uses the blue color that the original Arduino designers chose to help their boards stand out. The following is a list of major components of the Arduino Uno:

  • DC supply Input: The DC supply input can be used with an AC-to-DC power adapter or a battery. The power source can be connected using a 2.1 mm center-positive plug. The Arduino Uno operates at 5 volts but can have a maximum input of 20 volts; however, it is recommended to not use more than 12V.
  • Voltage Regulator: The Arduino uses a linear regulator to control the voltage going into the board.
  • USB Port: The USB port can be used to power and program the board.
  • RESET button: This button, when pressed, will reset the board.
  • ICSP for USB: The in-circuit serial programming pins are used to flash the firmware on the USB interface chip.
  • ICSP for ATmega328: The in-circuit serial programming pins are used to flash the firmware on the ATmega microcontroller.
  • Digital and PWM connectors: These pins, labeled 0 to 13, can be used as either a digital input or output pins. The pins labeled with the tilde (~) can also be used for Pulse-Width Modulation (PWM) output.
  • Analog In Connectors: The pins, labeled A0 to A5, can be used for analog input. These pins can be used to read the output from analog sensors.
  • Power and External Reset: These pins in this header, provide ground and power for external devices and sensors from the Arduino. The Arduino can also be powered through these pins. There is also a reset pin that can be used to reset the Arduino.
  • ATmega328: The microcontroller for the Arduino Uno board.

The Digital/PWM/Analog in/Power/Reset connectors are collectively known as the pin headers. The pins in these headers allow the Arduino to communicate with external sensors and other devices. Let's look at the different ways that we can power the Arduino board.