Articles Posted by the Author:

  • max(x, y)

    max(x, y)

    Description Calculates the maximum of two numbers. Parameters x: the first number, any data type y: the second number, any data type Returns The larger of the two parameter values. Example Note Perhaps counter-intuitively, max() is often used to constrain the lower end of a variable’s range, while min() is used to constrain the upper […]


  • min(x, y)

    min(x, y)

    Description Calculates the minimum of two numbers. Parameters x: the first number, any data type y: the second number, any data type Returns The smaller of the two numbers. Example Note Perhaps counter-intuitively, max() is often used to constrain the lower end of a variable’s range, while min() is used to constrain the upper end […]


  • delayMicroseconds()

    delayMicroseconds()

    Description Pauses the program for the amount of time (in microseconds) specified as parameter. There are a thousand microseconds in a millisecond, and a million microseconds in a second. Currently, the largest value that will produce an accurate delay is about 4000000. This could change in future 86Duino releases. For delays longer than a few […]


  • delay()

    delay()

    Description Pauses the program for the amount of time (in miliseconds) specified as parameter. (There are 1000 milliseconds in a second.) Syntax delay(ms) Parameters ms: the number of milliseconds to pause (unsigned long) Returns nothing Example Caveat While it is easy to create a blinking LED with the delay() function, and many sketches use short […]


  • micros()

    micros()

    Description Returns the number of microseconds since the 86Duino board began running the current program. This number will overflow (go back to zero), after approximately 70 minutes. This function has a resolution of one microsecond. Note: there are 1,000 microseconds in a millisecond and 1,000,000 microseconds in a second. Parameters None Returns Number of microseconds […]


  • millis()

    millis()

    Description Returns the number of milliseconds since the 86Duino board began running the current program. This number will overflow (go back to zero), after approximately 50 days. Parameters None Returns Number of milliseconds since the program started (unsigned long) Example Tip : Note that the parameter for millis is an unsigned long, errors may be […]


  • pulseIn()

    pulseIn()

    Description Reads a pulse (either HIGH or LOW) on a pin. For example, if value is HIGH, pulseIn() waits for the pin to go HIGH, starts timing, then waits for the pin to go LOW and stops timing. Returns the length of the pulse in microseconds. Gives up and returns 0 if no pulse starts […]


  • shiftIn()

    shiftIn()

    Description Shifts in a byte of data one bit at a time. Starts from either the most (i.e. the leftmost) or least (rightmost) significant bit. For each bit, the clock pin is pulled high, the next bit is read from the data line, and then the clock pin is taken low. If you’re interfacing with […]


  • shiftOut()

    shiftOut()

    Description Shifts out a byte of data one bit at a time. Starts from either the most (i.e. the leftmost) or least (rightmost) significant bit. Each bit is written in turn to a data pin, after which a clock pin is pulsed (taken high, then low) to indicate that the bit is available. Note: if […]


  • noTone()

    noTone()

    Description Stops the generation of a square wave triggered by tone(). Has no effect if no tone is being generated. NOTE: if you want to play different pitches on multiple pins, you need to call noTone() on one pin before calling tone() on the next pin. Syntax noTone(pin) Parameters pin: the pin on which to […]