Articles Posted by the Author:

  • volatile

    volatile

      volatile keyword volatile is a keyword known as a variable qualifier, it is usually used before the datatype of a variable, to modify the way in which the compiler and subsequent program treats the variable. Declaring a variable volatile is a directive to the compiler. The compiler is software which translates your C/C++ code […]


  • static

    static

      Static The static keyword is used to create variables that are visible to only one function. However unlike local variables that get created and destroyed every time a function is called, static variables persist beyond the function call, preserving their data between function calls. Variables declared as static will only be created and initialized […]


  • variable scope

    variable scope

    Variable Scope Variables in the C programming language, which Arduino uses, have a property called scope. This is in contrast to early versions of languages such as BASIC where every variable is a global variable. A global variable is one that can be seen by every function in a program. Local variables are only visible […]


  • float()

    float()

      float() Description Converts a value to the float data type. Syntax float(x) Parameters x: a value of any type Returns float Notes See the reference for float for details about the precision and limitations of floating point numbers on Arduino. See also float Reference Home Corrections, suggestions, and new documentation should be posted to […]


  • long()

    long()

      long() Description Converts a value to the long data type. Syntax long(x) Parameters x: a value of any type Returns long See also long 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 License. Code samples […]


  • word()

    word()

      word() Description Convert a value to the word data type or create a word from two bytes. Syntax word(x) word(h, l) Parameters x: a value of any type h: the high-order (leftmost) byte of the word l: the low-order (rightmost) byte of the word Returns word See also word Reference Home Corrections, suggestions, and […]


  • int()

    int()

      int() Description Converts a value to the int data type. Syntax int(x) Parameters x: a value of any type Returns int See also int 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 License. Code samples […]


  • byte()

    byte()

      char() Description Converts a value to the char data type. Syntax char(x) Parameters x: a value of any type Returns char See also char 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 License. Code samples […]


  • char()

    char()

      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 […]


  • array

    array

      Arrays An array is a collection of variables that are accessed with an index number. Arrays in the C programming language, on which Arduino is based, can be complicated, but using simple arrays is relatively straightforward. Creating (Declaring) an Array All of the methods below are valid ways to create (declare) an array. int […]