MATLAB Examples

getAccelerometer

Get the xyz value of accelerometer on Engduino

Contents

Syntax

accReading = e.getAccelerometer();

Description

e.getAccelerometer() Return 1x3 matrix which contains xyz value of Engduino accelerometer

Examples

  • Get the xyz value of Accelerometer
  • Connect to Engduino, Read Accelerometer

    % Check if the Engduino object already exists. Otherwise initialize it.
    if (~exist('e', 'var'))
            e = engduino();
    end
    
    while (true)
        % Get accelerometer reading
        accReading = e.getAccelerometer();
    end
    

    Input Arguments

    No input arguments.

    Output Arguments

    accReading Return a 1x3 Matrix that contains the xyz value of Engduino's accelerometer