MATLAB Examples

getTemperature

Get the temperature value in celcius from Engduino

Contents

Syntax

tempCelcius = e.getTemperature();

Description

e.getTemperature() Return temperature reading in celcius

Examples

  • Get temperature value
  • Connect to Engduino, Read temperature sensor

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

    Input Arguments

    No input arguments.

    Output Arguments

    tempCelcius Return (float)value of temperature in celcius