Articles Posted by the Author:

  • detachInterrupt()

    detachInterrupt()

      detachInterrupt() Description Turns off the given interrupt. Syntax detachInterrupt(interrupt) Parameters interrupt: the number of interrupt to disable (0 or 1). See also attachInterrupt() 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 in […]


  • attachInterrupt()

    attachInterrupt()

      attachInterrupt() Description Specifies a function to call when an external interrupt occurs. Replaces any previous function that was attached to the interrupt. Most Arduino boards have two external interrupts: numbers 0 (on digital pin 2) and 1 (on digital pin 3). The Arduino Mega has an additional four: numbers 2 (pin 21), 3 (pin […]


  • bit()

    bit()

      bit() Description Computes the value of the specified bit (bit 0 is 1, bit 1 is 2, bit 2 is 4, etc.). Syntax bit(n) Parameters n: the bit whose value to compute Returns the value of the bit See also bitRead() bitWrite() bitSet() bitClear() Reference Home Corrections, suggestions, and new documentation should be posted […]


  • bitClear()

    bitClear()

      bitClear() Description Clears (writes a 0 to) a bit of a numeric variable. Syntax bitClear(x, n) Parameters x: the numeric variable whose bit to clear n: which bit to clear, starting at 0 for the least-significant (rightmost) bit Returns none See also bit() bitRead() bitWrite() bitSet() Reference Home Corrections, suggestions, and new documentation should […]


  • bitSet()

    bitSet()

      bitSet() Description Sets (writes a 1 to) a bit of a numeric variable. Syntax bitSet(x, n) Parameters x: the numeric variable whose bit to set n: which bit to set, starting at 0 for the least-significant (rightmost) bit Returns none See also bit() bitRead() bitWrite() bitClear() Reference Home Corrections, suggestions, and new documentation should […]


  • bitWrite()

    bitWrite()

      bitWrite() Description Writes a bit of a numeric variable. Syntax bitWrite(x, n, b) Parameters x: the numeric variable to which to write n: which bit of the number to write, starting at 0 for the least-significant (rightmost) bit b: the value to write to the bit (0 or 1) Returns none See also bit() […]


  • bitRead()

    bitRead()

      bitRead() Description Reads a bit of a number. Syntax bitRead(x, n) Parameters x: the number from which to read n: which bit to read, starting at 0 for the least-significant (rightmost) bit Returns the value of the bit (0 or 1). See also bit() bitWrite() bitSet() bitClear() Reference Home Corrections, suggestions, and new documentation […]


  • highByte()

    highByte()

      highByte() Description Extracts the high-order (leftmost) byte of a word (or the second lowest byte of a larger data type). Syntax highByte(x) Parameters x: a value of any type Returns byte See also lowByte() word() Reference Home Corrections, suggestions, and new documentation should be posted to the Forum. The text of the Arduino reference […]


  • lowByte()

    lowByte()

      lowByte() Description Extracts the low-order (rightmost) byte of a variable (e.g. a word). Syntax lowByte(x) Parameters x: a value of any type Returns byte See also highByte() 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 […]


  • random()

    random()

      random() Description The random function generates pseudo-random numbers. Syntax random(max) random(min, max) Parameters min – lower bound of the random value, inclusive (optional) max – upper bound of the random value, exclusive Returns a random number between min and max-1 (long) Note: If it is important for a sequence of values generated by random() […]