| 
    upm
    1.3.0
    
   Sensor/Actuator repository for libmraa (v1.7.0) 
   | 
 

Go to the source code of this file.
Data Structures | |
| struct | _guvas12d_context | 
Functions | |
| guvas12d_context | guvas12d_init (int pin, float aref) | 
| void | guvas12d_close (guvas12d_context dev) | 
| upm_result_t | guvas12d_get_volts (const guvas12d_context dev, float *volts) | 
| upm_result_t | guvas12d_get_intensity (const guvas12d_context dev, float *intensity) | 
| void | guvas12d_set_offset (const guvas12d_context dev, float offset) | 
| void | guvas12d_set_scale (const guvas12d_context dev, float scale) | 
Typedefs | |
| typedef struct _guvas12d_context * | guvas12d_context | 
| guvas12d_context guvas12d_init | ( | int | pin, | 
| float | aref | ||
| ) | 
GUVA-S12D UV sensor constructor
| pin | Analog pin to use | 

| void guvas12d_close | ( | guvas12d_context | dev | ) | 
GUVAS12D destructor

| upm_result_t guvas12d_get_volts | ( | const guvas12d_context | dev, | 
| float * | volts | ||
| ) | 
Gets the voltage value from the sensor
| volts | Pointer to average voltage reading | 

| upm_result_t guvas12d_get_intensity | ( | const guvas12d_context | dev, | 
| float * | intensity | ||
| ) | 
Gets the illumination intensity in mW/m^2
| volts | Pointer to average voltage reading | 


| void guvas12d_set_offset | ( | const guvas12d_context | dev, | 
| float | offset | ||
| ) | 
Set sensor offset. This offset is applied to the illumination intensity value before scaling. Default is 0.0.
| dev | sensor context pointer | 
| offset | Offset to apply. | 

| void guvas12d_set_scale | ( | const guvas12d_context | dev, | 
| float | scale | ||
| ) | 
Set sensor scale. This offset is applied to the illumination intensity value before scaling. Default is 1.0.
| dev | sensor context pointer | 
| scale | Scale to apply. | 

| typedef struct _guvas12d_context * guvas12d_context | 
Device context
 1.8.6