| 
    upm
    1.0.2
    
   Sensor/Actuator repository for libmraa (v1.1.1) 
   | 
 

Go to the source code of this file.
Data Structures | |
| struct | _lm35_context | 
Functions | |
| lm35_context | lm35_init (int pin, float aref) | 
| void | lm35_close (lm35_context dev) | 
| upm_result_t | lm35_get_temperature (const lm35_context dev, float *temperature) | 
| void | lm35_set_offset (const lm35_context dev, float offset) | 
| void | lm35_set_scale (const lm35_context dev, float scale) | 
Typedefs | |
| typedef struct _lm35_context * | lm35_context | 
| lm35_context lm35_init | ( | int | pin, | 
| float | aref | ||
| ) | 
LM35 initialization.
| pin | Analog pin to use | 
| aref | Analog reference voltage | 

| void lm35_close | ( | lm35_context | dev | ) | 
LM35 close.

| upm_result_t lm35_get_temperature | ( | const lm35_context | dev, | 
| float * | temperature | ||
| ) | 
Returns the temperature in degrees Celsius
| temperature | A pointer to a float that will contain the measured temperature. | 

| void lm35_set_offset | ( | const lm35_context | dev, | 
| float | offset | ||
| ) | 
Set sensor offset. This offset is applied to the return values before scaling. Default is 0.0.
| dev | sensor context pointer | 
| offset | Offset to apply. | 

| void lm35_set_scale | ( | const lm35_context | dev, | 
| float | scale | ||
| ) | 
Set sensor scale. This scale is applied to the return values before the offset is applied. Default is 1.0.
| dev | sensor context pointer | 
| scale | Scale to apply. | 

| typedef struct _lm35_context * lm35_context | 
device context
 1.8.6