/*
Arduino Data Types
https://docs.arduino.cc/language-reference/#variables
*/
bool boolValue = true;
int intValue = 65535;
unsigned int uintValue = 65535;
long longValue = 2147483647;
float floatValue = 3.1415;
char charValue = 'A';
char charArray[12] = {"Hello world"}; // a "string of chars"
String strValue = "Hello world"; // a String
void setup() {
Serial.begin(115200);
Serial.println(boolValue); // 0 or 1
Serial.println(intValue); // signed integer
Serial.println(uintValue); // unsigned integer
Serial.println(longValue); // long is 4 bytes
Serial.println(floatValue, 3); // float is 4 bytes, this shows 3 decimal places
Serial.println(charValue); // a single byte character
Serial.println(charArray); // an array of characters
for (int i = 0; i < 5; i++) {
Serial.print(charArray[i]); // prints first 5 chars in the char array
}
Serial.println();
Serial.println(strValue + " " + floatValue); // prints a String
}
void loop() {
// nothing to loop about
}