unsigned char Description An unsigned data type that occupies 1 byte of memory. Same as the byte datatype. The unsigned char datatype encodes numbers from 0 to 255. For consistency of Arduino programming style, the byte data type is to be preferred. Example unsigned char myChar = 240; See also byte int array Serial.println […]
char Description A data type that takes up 1 byte of memory that stores a character value. Character literals are written in single quotes, like this: ‘A’ (for multiple characters – strings – use double quotes: “ABC”). Characters are stored as numbers however. You can see the specific encoding in the ASCII chart. This […]
Boolean Operators These can be used inside the condition of an if statement. && (logical and) True only if both operands are true, e.g. if (digitalRead(2) == HIGH && digitalRead(3) == HIGH) { // read two switches // ... } is true only if both inputs are high. || (logical or) True if either […]
void The void keyword is used only in function declarations. It indicates that the function is expected to return no information to the function from which it was called. Example: // actions are performed in the functions "setup" and "loop" // but no information is reported to the larger program void setup() { // […]
Integer Constants Integer constants are numbers used directly in a sketch, like 123. By default, these numbers are treated as int‘s but you can change this with the U and L modifiers (see below). Normally, integer constants are treated as base 10 (decimal) integers, but special notation (formatters) may be used to enter numbers […]