diff --git a/snipplets/code/Arduino/variables_sizes.ino b/snipplets/code/Arduino/variables_sizes.ino index ccf82e4..7bc66e1 100644 --- a/snipplets/code/Arduino/variables_sizes.ino +++ b/snipplets/code/Arduino/variables_sizes.ino @@ -15,6 +15,7 @@ void setup() { double example_double; char example_char; char * example_string; + bool example_bool; size_variable = sizeof(example_int); Serial.print("int bytes size: " ); @@ -47,6 +48,10 @@ void setup() { size_variable = sizeof(example_string); Serial.print("char * bytes size: " ); Serial.println(size_variable); + + size_variable = sizeof(example_bool); + Serial.print("bool bytes size: " ); + Serial.println(size_variable); } void loop() { @@ -64,4 +69,5 @@ void loop() { * double bytes size: 4 * char bytes size: 1 * char * bytes size: 2 + * bool bytes size: 1 */