upm
1.7.1
Sensor/Actuator repository for libmraa (v2.0.0)
|
Go to the source code of this file.
Data Structures | |
struct | _dfrph_context |
Functions | |
dfrph_context | dfrph_init (int16_t pin) |
void | dfrph_close (dfrph_context dev) |
upm_result_t | dfrph_set_aref (const dfrph_context dev, float aref) |
float | dfrph_get_aref (const dfrph_context dev) |
upm_result_t | dfrph_set_offset (const dfrph_context dev, float offset) |
upm_result_t | dfrph_set_scale (const dfrph_context dev, float scale) |
upm_result_t | dfrph_get_raw_volts (const dfrph_context dev, float *volts) |
upm_result_t | dfrph_get_ph (const dfrph_context dev, float *value) |
Typedefs | |
typedef struct _dfrph_context * | dfrph_context |
dfrph_context dfrph_init | ( | int16_t | pin | ) |
Initialize analog sensor
pin | is Analog pin |
void dfrph_close | ( | dfrph_context | dev | ) |
Analog sensor destructor
sensor | context pointer deallocate memory |
upm_result_t dfrph_set_aref | ( | const dfrph_context | dev, |
float | aref | ||
) |
Set ADC reference voltage
dev | sensor context pointer |
aref | ADC reference voltage |
float dfrph_get_aref | ( | const dfrph_context | dev | ) |
Get sensor aref
dev | sensor context pointer |
upm_result_t dfrph_set_offset | ( | const dfrph_context | dev, |
float | offset | ||
) |
Set sensor offset. This offset is applied to the return value: counts = counts + offset
dev | sensor context pointer |
offset | count offset value used |
upm_result_t dfrph_set_scale | ( | const dfrph_context | dev, |
float | scale | ||
) |
Set sensor scale. This scale is applied to the return value: counts = counts * scale
dev | sensor context pointer |
scale | count scale value used |
upm_result_t dfrph_get_raw_volts | ( | const dfrph_context | dev, |
float * | volts | ||
) |
Get raw volts
dev | sensor context pointer |
volts | Raw sensor voltage |
upm_result_t dfrph_get_ph | ( | const dfrph_context | dev, |
float * | value | ||
) |
Read value from sensor
dev | sensor context pointer |
value | pointer to returned pH value from sensor |
typedef struct _dfrph_context * dfrph_context |
device context