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)

Comments

There are two types of comments that can be used to within our Arduino code. These are block comments and line comments. Block comments are used when the text of the comment will span multiple lines and are usually used before function calls to let the reader know what a function does. The line comments are used when a short one-line comment is needed and are usually used within function blocks to let the reader know what a specific line of code is doing.

A block comment begins with /* and ends with */. The following code shows what a block comment would look like:

/* This is a block comment
   This comment can span multiple lines
   This type of comment is usually found outside function calls
*/

A line comment starts with // and goes until the end of the line. The line comment can start at the beginning of the line or it may be after a statement ends. The following examples...