Data types, pointers, and a pickle? (14)
When programming in Arduino, you might have occasion to go beyond the standard datatypes of int and String. Data Types You might have noticed that if you did the following: int count = 5; int groups = 2; Serial.println(count/groups); Serial would have printed 3. This can be a head-scratcher, especially since we never had the occasion to use other data types. A data type refers to what the data can represent. This primarily has to do with int, which cannot represent decimal points. The solution is to use a float which is another data type, except that now it can handle floating point operations. For example, if we changed the example above a little: ...