Data Types Reference Page
An array can be any single variable type.
- https://www.arduino.cc/reference/en/language/variables/data-types/bool/?
- holds the values true or false. This can be very useful with conditional statements.
- boolean
- byte
- A byte stores an 8-bit unsigned number, from 0 to 255. If you need a large number of variables it saves one byte over an "int" for each variable stored.
- char
- Holds character literals such as char myChar = 'A';
- char Str1[15];
- char Str2[8] = {'a', 'r', 'd', 'u', 'i', 'n', 'o'};
- char Str3[8] = {'a', 'r', 'd', 'u', 'i', 'n', 'o', '\0'};
- char Str4[] = "arduino";
- char Str5[8] = "arduino";
- char Str6[15] = "arduino";
- double
- This is a 4 byte float or double precision float on the Uno. On the Due board this is 8 bytes. A byte is 8 bits.
- float
- A float is a number with a decimal point. It has 4 bytes of information.
- int
- On the Uno -32,768 to 32,767
- long
- short
- I am not sure how this is different from an "int"
- String()
- unsigned char
- unsigned int
- On the Uno and other ATMEGA based boards, unsigned ints (unsigned integers) are the same as ints in that they store a 2 byte value. Instead of storing negative numbers however they only store positive values, yielding a useful range of 0 to 65,535 ((2^16) - 1).
- unsigned long
- Unsigned long variables are extended size variables for number storage, and store 32 bits (4 bytes). Unlike standard longs unsigned longs won’t store negative numbers, making their range from 0 to 4,294,967,295 (2^32 - 1). unsigned long var = val;
- word
- A word can store an unsigned number of at least 16 bits (from 0 to 65535).