MATLAB Examples


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.



e.pinModeA(pin, configuration);


e.pinModeA(pin, configuration); set the analog pin as input or output


  • set analog pin 13 as output
  • Connect to Engduino, configure digital pin 13 as output pin

    % Check if the Engduino object already exists. Otherwise initialize it.
    if (~exist('e', 'var'))
            e = engduino();
    e.pinModeA(13, e.PIN_TYPE_OUTPUT);

    Input Arguments

    pin Pin number
    configuration e.PIN_TYPE_INPUT or e.PIN_TYPE_OUTPUT state

    Output Arguments

    res Return status to indicate whether function has been executed (int) 0: OK, <0: Error code