Articles Posted in the " " Category

  • attachInterrupt()

    attachInterrupt()

    Description Attach interrupt service to encoder interface. Under different operating mode, the condition to trigger interrupt is different: Pulse/DIR, CW/CCW and A/B Pulse mode: index interrupt event (trigger by setIndexReset()), comparator interrupt event (trigger by setComparator()), counter overflow interrupt event (trigger by setRange()), counter underflow interrupt event (trigger by setRange()). PWM pulse capture mode: Pulse […]


  • pulseIn()

    pulseIn()

    Description Read the pulse width value for a designated pin (designated by the pin parameter), during signal HIGH or LOW condition (designated by the state parameter). Pulse width value is the length of time the pin’s voltage remain HIGH or LOW. For example, when the state parameter is set to HIGH, the pulseIn() function wait […]


  • readNanoseconds()

    readNanoseconds()

    Description This function can only be used under PWM Pulse capture mode, similar function as read() with returning variable in nanosecond (ns) for the width of the pulse. Syntax Enc0.readNanoseconds() Enc1.readNanoseconds() Enc2.readNanoseconds() Enc3.readNanoseconds() Parameters Enc0、Enc1、Enc2、Enc3:Corresponding to ENC0, ENC1, ENC2 and ENC3 encoder interfaces. Returns Return width of the pulse in LOW and HIGH condition, where […]


  • indexRead()

    indexRead()

    Description Returns voltage potential for pin Z, this function is designed to work in the Pulse/DIR, CW/CCW and A/B Pulse modes. Syntax Enc0.indexRead() Enc1.indexRead() Enc2.indexRead() Enc3.indexRead() Parameters Enc0、Enc1、Enc2、Enc3:Corresponding to ENC0, ENC1, ENC2 and ENC3 encoder interfaces. Returns LOW or HIGH Example See also - begin() - setIndexReset() Libraries Reference Home The text of the 86Duino […]


  • read()

    read()

    Description Function to read the encoder’s counter value and pulse width. Note: Under different mode, the return value has different representation. See the Returns section below. Syntax Enc0.read() Enc1.read() Enc2.read() Enc3.read() Parameters Enc0、Enc1、Enc2、Enc3:Corresponding to ENC0, ENC1, ENC2 and ENC3 encoder interfaces. Returns Pulse/DIR, CW/CCW and A/B Pulse modes: Return the encoder’s counter value. PWM pulse […]


  • write()

    write()

    Description Set 86Duino encoder counter value. Use with Pulse/DIR, CW/CCW and A/B Pulse operating mode. Syntax Enc0.write(number) Enc1.write(number) Enc2.write(number) Enc3.write(number) Parameters Enc0、Enc1、Enc2、Enc3:Correspond to ENC0、ENC1、ENC2、ENC3 encoder interface. number:Encoder counter value to be set(unsigned long) Returns None Example See also - read() Libraries Reference Home The text of the 86Duino reference is licensed under a Creative Commons […]


  • begin()

    begin()

    Description Initialize 86Duino encoder interface and set operating mode. Syntax Enc0.begin(mode) Enc0.begin(mode, bits) Enc0.begin(mode, bits, clock) Enc0.begin(mode, bits, clock, wtime) Enc0.begin(mode, bits, clock, wtime, gray2bin) Enc1.begin(mode) Enc1.begin(mode, bits) Enc1.begin(mode, bits, clock) Enc1.begin(mode, bits, clock, wtime) Enc1.begin(mode, bits, clock, wtime, gray2bin) Enc2.begin(mode) Enc2.begin(mode, bits) Enc2.begin(mode, bits, clock) Enc2.begin(mode, bits, clock, wtime) Enc2.begin(mode, bits, clock, wtime, gray2bin) […]


  • write()

    write()

    Description Play an audio signal from a buffer. Syntax Audio.write(buffer, length); Parameters buffer (short) : the named buffer with the audio file. length (int) : number of samples to write. Returns nothing Example Libraries Reference Home The text of the 86Duino reference is a modification of the Arduino reference, and is licensed under a Creative […]


  • prepare()

    prepare()

    Description Prepares audio samples from the named file to the audio buffer, and sets the volume. Syntax Audio.prepare(buffer, samples, volume); Parameters buffer (short) : the named buffer holding the audio file. samples (int) : number of samples to write. volume (int) : a 10-bit number representing the volume of the audio being played. 0 turns […]


  • begin()

    begin()

    Description Initializes the Audio library by specifying the target sample rate and size of the audio buffer. Syntax Audio.begin(rate, size); Parameters rate (int) : the sample rate of the sound file. If stereo, double the rate (ex. 44100hz stereo = 88200). size (int) : the size of the audio buffer in milliseconds. Returns nothing Example […]