upm  0.1.8
Sensor/Actuator repository for libmraa (v0.4.5)
 All Data Structures Files Functions Variables Macros Pages
Public Member Functions
GroveTemp Class Reference

C++ API for Grove Temperature sensor. More...

Detailed Description

Very basic UPM module for grove temperature sensor on analog

std::cout << s->name() << std::endl;
for (int i=0; i < 10; i++) {
std::cout << s->value() << std::endl;
sleep(1);
}

Public Member Functions

 GroveTemp (unsigned int pin)
 
float raw_value ()
 
int value ()
 
- Public Member Functions inherited from Grove
std::string name ()
 

Additional Inherited Members

- Protected Attributes inherited from Grove
std::string m_name
 

Member Function Documentation

float raw_value ( )

Get raw value from AIO pin

Returns
the raw value from the ADC
int value ( )

Get the temperature from the sensor

Returns
the normalised temperature
Inheritance diagram for GroveTemp:
Inheritance graph
[legend]
Collaboration diagram for GroveTemp:
Collaboration graph
[legend]

The documentation for this class was generated from the following files: