Grove temperature sensor library

Dependents:   Grove_Temp_Hello_world

Embed: (wiki syntax)

« Back to documentation index

Grove_temp_sensor Class Reference

Grove_temp_sensor Class Reference

Setup a new class for Grove_temp_sensor sensor. More...

#include <Grove_temp_sensor.h>

Public Member Functions

 Grove_temp_sensor (PinName pin)
 Create a Grove_temp_sensor object connected to the pin.
float read_F ()
 Read the temperature in Fahrenheit.
float read_C ()
 Read the temperature in Celsius.
float operator= (Grove_temp_sensor &rhs)
 Shorthand to read the temperature value.

Detailed Description

Setup a new class for Grove_temp_sensor sensor.

Definition at line 10 of file Grove_temp_sensor.h.


Constructor & Destructor Documentation

Grove_temp_sensor ( PinName  pin )

Create a Grove_temp_sensor object connected to the pin.

Parameters:
pinto connect to

Definition at line 5 of file Grove_temp_sensor.cpp.


Member Function Documentation

float operator= ( Grove_temp_sensor rhs )

Shorthand to read the temperature value.

Parameters:
returnstemperature in Celsius

Definition at line 32 of file Grove_temp_sensor.cpp.

float read_C (  )

Read the temperature in Celsius.

Parameters:
returnstemperature

Definition at line 22 of file Grove_temp_sensor.cpp.

float read_F (  )

Read the temperature in Fahrenheit.

Parameters:
returnstemperature

Definition at line 10 of file Grove_temp_sensor.cpp.