Hide minor edits - Show changes to markup
Read the temperature sensor and returns the temperature reading in Celsius or Fahrenheit scale, depending on the parameter passed.
Reads the ambient temperature of the temperature sensor and returns a reading in either the Celsius or Fahrenheit scale, depending on the parameter passed.
scale: this argument is used to choose the scale of the output, valid arguments are: DEGREES_C and DEGREES_F
scale: the scale of the output, valid arguments are: DEGREES_C and DEGREES_F
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.
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.
Serial.begin(9600);
Serial.begin(9600);
int celsius = Esplora.readTemperature(DEGREES_C); int fahrenheit = Esplora.readTemperature(DEGREES_F); Serial.print(celsius); Serial.print("\t"); Serial.print(fahrenheit);
delay(1000); }
int celsius = Esplora.readTemperature(DEGREES_C);
int fahrenheit = Esplora.readTemperature(DEGREES_F);
Serial.print(celsius);
Serial.print("\t");
Serial.print(fahrenheit);
delay(1000);
}
Read the temperature sensor and returns the temperature reading in Celsius or Fahrenheit scale, dependig to the parameter passed.
Read the temperature sensor and returns the temperature reading in Celsius or Fahrenheit scale, depending on the parameter passed.
scale: this argument is used to choose the scale of the output, valid argument are: DEGREES_C and DEGREES_F
scale: this argument is used to choose the scale of the output, valid arguments are: DEGREES_C and DEGREES_F
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.
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.
[@
(:source lang=arduino tabwidth=4:)
@]
(:sourceend:)
Read the temperature sensor and returns the temperature reading in Celsius or Fahrenheit scale, dependig to the parameter passed.
readTemperature(scale)
scale: this argument is used to choose the scale of the output, valid argument are: DEGREES_C and DEGREES_F
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.
#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);
}