Arduino - Constants

Arduino

Guide

Tutorials

Reference

Hardware

Software

Forum

Playground

Exhibition

Hacking

FAQ

Buy

Language | Libraries | Comparison

# Constants

Constants are predefined variables in the system. They are used to make the programs easier to read. We classify constants in groups.

### Defining Logical levels

When reading or writing to a digital pin there are only two possible values a pin can take/be-set-to: HIGH and LOW.

HIGH is representing the programming equivalent to 5 Volts. When reading the value at a digital pin if we get 3 Volts or more the microprocessor will understad it as HIGH. This constant represents the integer number 1, and also the truth level TRUE.

LOW is representing the programming equivalen to 0 Volts. When reading the value at a digital pin if we get 2 Volts or less the microprocessor will understand it as LOW. This constant represents the integer number 0, and also the truth level FALSE.

### Defining Digital Pins

Digital pins can be used either as INPUT or OUTPUT. These values represent precisely what their meaning stands for.

Reference Home

Corrections, suggestions, and new documentation should be posted to the Forum.

Edit Page | Page History | Printable View | Recent Site Changes