Articles Posted in the " " Category

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


  • tone()

    tone()

    Description Generates a square wave of the specified frequency (and 50% duty cycle) on a pin. A duration can be specified, otherwise the wave continues until a call to noTone(). The pin can be connected to a piezo buzzer or other speaker to play tones. Only one tone can be generated at a time. If […]


  • analogWriteResolution()

    analogWriteResolution()

    Description analogWriteResolution() sets the resolution of the analogWrite() function. It defaults to 8 bits (values between 0-255) for compatibility with AVR-based Arduino boards. The 86Duino’s CPU includes twelve 32-bit PWM timers, each of which allows a PWM duty cycle of 10ns at the minimum. In our implementation of the analogWrite() function with a 1000Hz PWM […]


  • analogReadResolution()

    analogReadResolution()

    Description Sets the size (in bits) of the value returned by analogRead(). It defaults to 10 bits (returns values between 0-1023) for compatibility with AVR-based Arduino boards. The 86Duino boards have 11-bit ADC capabilities that can be accessed by changing the resolution to 11. This will return values from analogRead() between 0 and 2047. Syntax […]


  • analogWrite()

    analogWrite()

    Description Writes an analog value (PWM wave) to a pin. Can be used to light a LED at varying brightnesses or drive a motor at various speeds. After a call to analogWrite(), the pin will generate a steady square wave of the specified duty cycle until the next call to analogWrite() (or a call to […]


  • analogRead()

    analogRead()

    Description Reads the value from the specified analog pin. The 86Duino boards contain several channels (6 channels on the Zero and EduCake, 7 on the One), 11-bit analog to digital converter. This means that it will map input voltages between 0 and 3.3 volts into integer values between 0 and 1023 (or 2047 by calling […]


  • digitalRead()

    digitalRead()

    Description Reads the value from a specified digital pin, either HIGH or LOW. Syntax digitalRead(pin) Parameters pin: the number of the digital pin you want to read (int) Returns HIGH or LOW Example Sets pin 13 to the same value as pin 7, declared as an input. Note If the pin isn’t connected to anything, […]