Articles Posted by the Author:

  • analogWriteResolution()

    analogWriteResolution()

    analogWriteResolution() Description analogWriteResolution() is an extension of the Analog API for the Arduino Due. analogWriteResolution() sets the resolution of the analogWrite() function. It defaults to 8 bits (values between 0-255) for backward compatibility with AVR based boards. The Due has the following hardare capabilities: 12 pins which default to 8-bit PWM, like the AVR-based boards. […]


  • analogReadResolution()

    analogReadResolution()

    analogReadResolution() Description analogReadResolution() is an extension of the Analog API for the Arduino Due. Sets the size (in bits) of the value returned by analogRead(). It defaults to 10 bits (returns values between 0-1023) for backward compatibility with AVR based boards. The Due has 12-bit ADC capabilities that can be accessed by changing the resolution […]


  • analogWrite() – PWM

    analogWrite() – PWM

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


  • analogRead()

    analogRead()

      analogRead() Description Reads the value from the specified analog pin. The Arduino board contains a 6 channel (8 channels on the Mini and Nano, 16 on the Mega), 10-bit analog to digital converter. This means that it will map input voltages between 0 and 5 volts into integer values between 0 and 1023. This […]


  • analogReference(type)

    analogReference(type)

    Description For Arduino, this function is used to configure the reference voltage used for analog input. But for 86Duino, this function is not supported and thus does nothing when called. (This function is reserved by 86Duino for the compatibility to Arduino sketches.) Parameters type: which type of reference to use (DEFAULT, INTERNAL, INTERNAL1V1, INTERNAL2V56, or […]


  • digitalRead()

    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 int ledPin = 13; // LED connected to digital pin 13 int inPin = 7; // pushbutton connected to digital […]


  • digitalWrite()

    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: 5V (or 3.3V on 3.3V boards) for HIGH, 0V (ground) for LOW. If the pin is configured as an INPUT, writing […]


  • pinMode()

    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. As of Arduino 1.0.1, it is possible to enable the internal pullup resistors with the mode INPUT_PULLUP. Additionally, the INPUT mode explicitly disables the internal […]


  • sizeof()

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


  • const

    const

      const keyword 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 […]