Articles Posted by the Author:

  • String – object

    String – object

      String Description The String class, part of the core as of version 0019, allows you to use and manipulate strings of text in more complex ways than character arrays do. You can concatenate Strings, append to them, search for and replace substrings, and more. It takes more memory than a simple character array, but […]


  • string – char array

    string – char array

    string Description Text strings can be represented in two ways. you can use the String data type, which is part of the core as of version 0019, or you can make a string out of an array of type char and null-terminate it. This page described the latter method. For more details on the String […]


  • double

    double

      double Desciption Double precision floating point number. Occupies 4 bytes. The double implementation on the Arduino is currently exactly the same as the float, with no gain in precision. Tip Users who borrow code from other sources that includes double variables may wish to examine the code to see if the implied precision is […]


  • float

    float

      float Description Datatype for floating-point numbers, a number that has a decimal point. Floating-point numbers are often used to approximate analog and continuous values because they have greater resolution than integers. Floating-point numbers can be as large as 3.4028235E+38 and as low as -3.4028235E+38. They are stored as 32 bits (4 bytes) of information. […]


  • short

    short

    short Description A short is a 16-bit data-type. On all Arduinos (ATMega and ARM based) a short stores a 16-bit (2-byte) value. This yields a range of -32,768 to 32,767 (minimum value of -2^15 and a maximum value of (2^15) – 1). Example short ledPin = 13; Syntax short var = val; var – your […]


  • long

    long

      long Description Long variables are extended size variables for number storage, and store 32 bits (4 bytes), from -2,147,483,648 to 2,147,483,647. Example long speedOfLight = 186000L; // see Integer Constants for explanation of the 'L' Syntax long var = val; var – the long variable name val – the value assigned to the variable […]


  • word

    word

      word Description A word stores a 16-bit unsigned number, from 0 to 65535. Same as an unsigned int. Example word w = 10000; See also byte word() Reference Home Corrections, suggestions, and new documentation should be posted to the Forum. The text of the Arduino reference is licensed under a Creative Commons Attribution-ShareAlike 3.0 […]


  • unsigned int

    unsigned int

      unsigned int Description 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). The difference between unsigned ints and (signed) ints, lies in the way […]


  • int

    int

      int Description Integers are your primary datatype for number storage, and store a 2 byte value. This yields a range of -32,768 to 32,767 (minimum value of -2^15 and a maximum value of (2^15) – 1). Int’s store negative numbers with a technique called 2’s complement math. The highest bit, sometimes refered to as […]


  • byte

    byte

      byte Description A byte stores an 8-bit unsigned number, from 0 to 255. Example byte b = B10010; // "B" is the binary formatter (B10010 = 18 decimal) See also word byte() Variable Declaration Reference Home Corrections, suggestions, and new documentation should be posted to the Forum. The text of the Arduino reference is […]