A constant is a value that never changes. In the Arduino programming language, we have two ways to declare constants. We can use the const keyword or the #define component.
The #define component enables us to give a name to a constant value prior to the application being compiled. The compiler will replace all references to these constants, with the assigned value, prior to the application being compiled. This means that the defined constants do not take up any program space in memory, which may be an advantage if you are trying to squeeze a large program into an Arduino Nano.
The #define component does have some drawbacks where the biggest drawback being if the name that is defined for the constant is also included in some other constant or variable name then the name would be replaced by the value defined in the #define component. For this reason, when I use the #define...