O'Reilly logo

Mastering Arduino by Jon Hoffman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required