Reference.EsploraReadTemperature History

Hide minor edits - Show changes to markup

December 04, 2012, at 07:02 PM by Scott Fitzgerald -
Changed lines 7-8 from:

Read the temperature sensor and returns the temperature reading in Celsius or Fahrenheit scale, depending on the parameter passed.

to:

Reads the ambient temperature of the temperature sensor and returns a reading in either the Celsius or Fahrenheit scale, depending on the parameter passed.

Changed lines 15-16 from:

scale: this argument is used to choose the scale of the output, valid arguments are: DEGREES_C and DEGREES_F

to:

scale: the scale of the output, valid arguments are: DEGREES_C and DEGREES_F

Changed lines 19-20 from:

int : The temperature reading Celsius or Fahrenheit. The Celsius range is from -40°C to 150°C, the Fahrenheit range is from -40°F to 302°F.

to:

int : The temperature reading in Celsius or Fahrenheit. The Celsius range is from -40°C to 150°C, the Fahrenheit range is from -40°F to 302°F.

December 04, 2012, at 06:55 PM by Scott Fitzgerald -
Changed line 28 from:

Serial.begin(9600);

to:
  Serial.begin(9600);
Changed line 30 from:
to:
Changed lines 33-40 from:

int celsius = Esplora.readTemperature(DEGREES_C); int fahrenheit = Esplora.readTemperature(DEGREES_F); Serial.print(celsius); Serial.print("\t"); Serial.print(fahrenheit);

delay(1000); }

to:
  int celsius = Esplora.readTemperature(DEGREES_C);
  int fahrenheit = Esplora.readTemperature(DEGREES_F);
  Serial.print(celsius);
  Serial.print("\t");
  Serial.print(fahrenheit);

  delay(1000);

}

December 04, 2012, at 06:47 PM by Scott Fitzgerald -
Changed lines 7-8 from:

Read the temperature sensor and returns the temperature reading in Celsius or Fahrenheit scale, dependig to the parameter passed.

to:

Read the temperature sensor and returns the temperature reading in Celsius or Fahrenheit scale, depending on the parameter passed.

Changed lines 15-16 from:

scale: this argument is used to choose the scale of the output, valid argument are: DEGREES_C and DEGREES_F

to:

scale: this argument is used to choose the scale of the output, valid arguments are: DEGREES_C and DEGREES_F

Changed lines 19-23 from:

The temperature reading in the Celsius or Fahrenheit scale. The Celsius range is from -40°C to 150°C.
The Fahrenheit range is from -40°F to 302°F.

to:

int : The temperature reading Celsius or Fahrenheit. The Celsius range is from -40°C to 150°C, the Fahrenheit range is from -40°F to 302°F.

Changed line 23 from:

[@

to:
Changed line 41 from:

@]

to:
December 03, 2012, at 04:19 PM by Federico -
Added lines 1-44:

Esplora

readTemperature()

Description

Read the temperature sensor and returns the temperature reading in Celsius or Fahrenheit scale, dependig to the parameter passed.

Syntax

readTemperature(scale)

Parameters

scale: this argument is used to choose the scale of the output, valid argument are: DEGREES_C and DEGREES_F

Returns

The temperature reading in the Celsius or Fahrenheit scale. The Celsius range is from -40°C to 150°C.
The Fahrenheit range is from -40°F to 302°F.

Example

#include <Esplora.h>

void setup()
{
Serial.begin(9600);
} 

void loop()
{
int celsius = Esplora.readTemperature(DEGREES_C);
int fahrenheit = Esplora.readTemperature(DEGREES_F);
Serial.print(celsius);
Serial.print("\t");
Serial.print(fahrenheit);

delay(1000);
} 

Share