ProgrammingNov 8, 2026Trần Thế Phúc
ARDUINO TUTORIAL #4
#Arduino#Variable#Programming#Tutorial
SPECIFICATION & TECHNICAL NOTES
NAMING VARIABLES IN ARDUINO
Function:
Variables are used to store values, making them easier to reuse and modify throughout the program.
MAIN VARIABLE TYPES
THREE MAIN VARIABLE TYPES:
int
Used to store integers (whole numbers).
String
Used to store strings of characters (text).
float
Used to store decimal numbers (floating-point numbers).
EXAMPLES
// String variable
String name = "abc";
// Integer variable
int number = 67;
// Floating-point variable
float decimal = 67.67;
IMPORTANT NOTES
IMPORTANT:
- Global variables should be declared at the beginning of the program, before the
void setup()function.
Verified by FTC 31113 Technical LeadID: b29e5633-9761-431c-b591-0df6c33497f6
