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

Variables

A variable is used to store information that can be referenced or manipulated within the code. A variable is given a unique name which can then be used to access the information. The name of the variable should be something that describes what the variable is so anyone that looks at the code will understand what the variable is used for. Camel case should be used when naming a variable.

Camel case is used when creating a name out of multiple words are phases where the first letter of the name is lowercase, but the beginning of each remaining word is uppercase. Some examples of camel case are ledOne, myVariable and redLedOnRightSide.

When a variable is declared it is usually a good idea to give it an initial value. This helps to ...

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