MATLAB Examples

getLight

Measure light intensity from light sensor on Engduino

Contents

Syntax

light_intensity = e.getLight();

Description

e.getLight() Return an integer value of the light intensity measured

Examples

  • Get the light intensity from Engduino
  • Connect to Engduino, Get reading from light sensor

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

    Input Arguments

    No input arguments.

    Output Arguments

    light_intensity Return (int)value of the light intensity measured