Articles Posted by the Author:

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


  • pinMode()

    pinMode()

    Description Configures the specified pin to behave either as an input or an output. See the description of digital pins for details on the functionality of the pins. It is possible to enable the internal pullup resistors with the mode INPUT_PULLUP. Additionally, the INPUT mode explicitly disables the internal pullups. Syntax pinMode(pin, mode) Parameters pin: […]


  • digitalWrite()

    digitalWrite()

    Description Write a HIGH or a LOW value to a digital pin. If the pin has been configured as an OUTPUT with pinMode(), its voltage will be set to the corresponding value: 3.3V for HIGH, 0V (ground) for LOW. Syntax digitalWrite(pin, value) Parameters pin: the pin number value: HIGH or LOW Returns none Example Sets […]


  • sizeof

    sizeof

    Description The sizeof operator returns the number of bytes in a variable type, or the number of bytes occupied by an array. Syntax sizeof(variable) Parameters variable: any variable type or array (e.g. int, float, byte) Example code The sizeof operator is useful for dealing with arrays (such as strings) where it is convenient to be […]


  • const

    const

    The const keyword stands for constant. It is a variable qualifier that modifies the behavior of the variable, making a variable “read-only”. This means that the variable can be used just as any other variable of its type, but its value cannot be changed. You will get a compiler error if you try to assign […]